add gbuffer files
This commit is contained in:
parent
914e9189bc
commit
1c48afe266
27
res/shader/cnmr.gbuffer
Normal file
27
res/shader/cnmr.gbuffer
Normal file
@ -0,0 +1,27 @@
|
||||
[attribute]
|
||||
|
||||
vec3 BaseColor;
|
||||
vec3 Normal;
|
||||
float Metallic;
|
||||
float Roughness;
|
||||
|
||||
[output]
|
||||
|
||||
vec4 gb_color_metallic;
|
||||
vec4 gb_normal_roughness;
|
||||
|
||||
[attribute_to_gbuffer]
|
||||
|
||||
gb_color_metallic.rgb =BaseColor;
|
||||
gb_color_metallic.a =Metallic;
|
||||
|
||||
gb_normal_roughness.rgb =Normal;
|
||||
gb_normal_roughness.a =Roughness;
|
||||
|
||||
[gbuffer_to_attribute]
|
||||
|
||||
BaseColor =gb_color_metallic.rgb;
|
||||
Metallic =gb_color_metallic.a;
|
||||
|
||||
Normal =gb_normal_roughness.rgb;
|
||||
Roughness =gb_normal_roughness.a;
|
15
res/shader/color.gbuffer
Normal file
15
res/shader/color.gbuffer
Normal file
@ -0,0 +1,15 @@
|
||||
[attribute]
|
||||
|
||||
vec4 BaseColor;
|
||||
|
||||
[output]
|
||||
|
||||
vec4 gb_color;
|
||||
|
||||
[attribute_to_gbuffer]
|
||||
|
||||
gb_color=BaseColor;
|
||||
|
||||
[gbuffer_to_attribute]
|
||||
|
||||
BaseColor=texture(gb_color,vs_out_position);
|
Loading…
x
Reference in New Issue
Block a user