Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 400 core
- flat in int materialId;
- flat in vec4 vtColor;
- in vec4 worldPos;
- in vec3 normal;
- in vec2 uv;
- layout (location=0) out vec4 out_diffuse;//rgb = color, a = ambient multiply
- layout (location=1) out vec4 out_specular;//rgb = color, a = roughness
- layout (location=2) out vec3 out_emmision;
- layout (location=3) out vec3 out_worldPos;
- layout (location=4) out vec3 out_normal;
- <INCLUDE>
- <UNIFORM>
- vec3 calcDiffuse(){
- <DIFFUSE>
- }
- float calcAmbient(){
- <AMBIENT>
- }
- vec3 calcSpecular(){
- <SPECULAR>
- }
- float calcRoughness(){
- <ROUGHNESS>
- }
- vec3 calcEmmision(){
- <ROUGHNESS>
- }
- vec3 calcNormal(){
- <NORMAL>
- }
- void main(void){
- out_worldPos=worldPos;
- out_normal=calcNormal();
- out_diffuse=vec4(calcDiffuse(),calcAmbient());
- out_specular=vec4(calcSpecular(),calcRoughness());
- out_emmision=calcEmmision();
- }
Add Comment
Please, Sign In to add comment