mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-28 09:49:18 -05:00
Added glsl 100 and 120 shaders to lightmap example. (#3543)
* Added glsl 100 and 120 shaders to lightmap example. * Fixed lightmap example resource loading on web.
This commit is contained in:
22
examples/shaders/resources/shaders/glsl100/lightmap.fs
Normal file
22
examples/shaders/resources/shaders/glsl100/lightmap.fs
Normal file
@ -0,0 +1,22 @@
|
||||
#version 100
|
||||
|
||||
precision mediump float;
|
||||
|
||||
// Input vertex attributes (from vertex shader)
|
||||
varying vec2 fragTexCoord;
|
||||
varying vec2 fragTexCoord2;
|
||||
varying vec3 fragPosition;
|
||||
varying vec4 fragColor;
|
||||
|
||||
// Input uniform values
|
||||
uniform sampler2D texture0;
|
||||
uniform sampler2D texture1;
|
||||
|
||||
void main()
|
||||
{
|
||||
// Texel color fetching from texture sampler
|
||||
vec4 texelColor = texture2D(texture0, fragTexCoord);
|
||||
vec4 texelColor2 = texture2D(texture1, fragTexCoord2);
|
||||
|
||||
gl_FragColor = texelColor * texelColor2;
|
||||
}
|
||||
Reference in New Issue
Block a user