Skip to content

Commit 09e9d38

Browse files
committed
Fixed transparency in the Shaders. Closes #773
1 parent 31835e0 commit 09e9d38

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Interface/Modules/Render/ES/shaders/DirPhong.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ void main()
7070
float spec = max(0.0, dot(reflection, uCamViewVec));
7171

7272
spec = pow(spec, uSpecularPower);
73-
gl_FragColor = diffuse * spec * uSpecularColor + diffuse * uDiffuseColor + uAmbientColor;
73+
gl_FragColor = vec4((diffuse * spec * uSpecularColor + diffuse * uDiffuseColor + uAmbientColor).rgb, uDiffuseColor.a);
7474
}
7575

src/Interface/Modules/Render/ES/shaders/DirPhongCMap.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ void main()
7373
float spec = max(0.0, dot(reflection, uCamViewVec));
7474

7575
vec4 diffuseColor = texture1D( uTX0, vFieldData );
76-
diffuseColor.a = uTransparency;
76+
//diffuseColor.a = uTransparency;
7777

7878
spec = pow(spec, uSpecularPower);
79-
gl_FragColor = diffuse * spec * uSpecularColor + diffuse * diffuseColor + uAmbientColor;
79+
gl_FragColor = vec4((diffuse * spec * uSpecularColor + diffuse * diffuseColor + uAmbientColor).rgb, uTransparency);
8080
}
8181

src/Interface/Modules/Render/ES/shaders/DirPhongCMapUniform.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ void main()
7272
float spec = max(0.0, dot(reflection, uCamViewVec));
7373

7474
vec4 diffuseColor = texture1D( uTX0, vFieldData );
75-
diffuseColor.a = uTransparency;
75+
//diffuseColor.a = uTransparency;
7676

7777
spec = pow(spec, uSpecularPower);
78-
gl_FragColor = diffuse * spec * uSpecularColor + diffuse * diffuseColor + uAmbientColor;
78+
gl_FragColor = vec4(diffuse * spec * uSpecularColor + diffuse * diffuseColor + uAmbientColor).rgb, uTransparency);
7979
}
8080

0 commit comments

Comments
 (0)