File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/Interface/Modules/Render/ES/shaders Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ uniform vec4 uDiffuseColor; // Diffuse color
4040uniform vec4 uSpecularColor; // Specular color
4141uniform float uSpecularPower; // Specular power
4242uniform vec3 uLightDirWorld; // Directional light (world space).
43+ uniform float uTransparency;
4344
4445// Lighting in world space. Generally, it's better to light in eye space if you
4546// are dealing with point lights. Since we are only dealing with directional
@@ -70,7 +71,9 @@ void main()
7071 vec3 reflection = reflect (invLightDir, normal);
7172 float spec = max (0.0 , dot (reflection, uCamViewVec));
7273
74+ vec4 diffuseColor = vColor;
75+
7376 spec = pow (spec, uSpecularPower);
74- gl_FragColor = vec4 ((diffuse * spec * uSpecularColor + diffuse * vColor + uAmbientColor).rgb, uDiffuseColor.a );
77+ gl_FragColor = vec4 ((diffuse * spec * uSpecularColor + diffuse * diffuseColor + uAmbientColor).rgb, uTransparency );
7578}
7679
Original file line number Diff line number Diff line change 3636
3737varying vec4 fColor;
3838
39+ uniform float uTransparency;
40+
3941void main()
4042{
41- gl_FragColor = fColor;
43+ gl_FragColor = vec4 ( fColor.xyz,uTransparency) ;
4244}
You can’t perform that action at this time.
0 commit comments