mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 19:55:02 +01:00
Credit where credit is due, fix alpha issue with light shader
This commit is contained in:
parent
45af69faa0
commit
b2ccd962c9
1 changed files with 4 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// Based on https://github.com/romrz/Basic-2D-lighting
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 resolution;
|
||||
uniform vec2 mouse;
|
||||
|
|
@ -38,7 +40,7 @@ void main() {
|
|||
|
||||
// Applies the light to the pixel
|
||||
vec3 intensity = ambient + light;
|
||||
vec3 final = pixel.rgb * intensity;
|
||||
vec4 final = pixel * vec4(intensity.r, intensity.g, intensity.b, 1.0);
|
||||
|
||||
gl_FragColor = vec4(final, 1.0);
|
||||
gl_FragColor = final;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue