mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-04 21:31:11 -05:00
21 lines
463 B
Text
21 lines
463 B
Text
|
#extension GL_EXT_shadow_samplers : require
|
||
|
#extension GL_EXT_shader_texture_lod : require
|
||
|
|
||
|
uniform sampler2D tex;
|
||
|
uniform sampler2DShadow shadowmap;
|
||
|
|
||
|
varying highp vec4 uv;
|
||
|
|
||
|
void main() {
|
||
|
lowp vec4 c;
|
||
|
c = texture2DProj(tex, uv);
|
||
|
c += texture2DProj(tex, uv.xyz);
|
||
|
c += texture2DProjLodEXT(tex, uv, 1.0);
|
||
|
c += texture2DProjLodEXT(tex, uv.xyz, 1.0);
|
||
|
|
||
|
c += vec4(shadow2DEXT(shadowmap, uv.xyz));
|
||
|
c += vec4(shadow2DProjEXT(shadowmap, uv));
|
||
|
|
||
|
gl_FragColor = c;
|
||
|
}
|