mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-12 09:11:18 -05:00
13 lines
414 B
Text
13 lines
414 B
Text
#version 300 es
|
|
precision mediump float;
|
|
uniform sampler2D tex;
|
|
uniform samplerCube cub;
|
|
in mediump vec3 uv1;
|
|
in highp vec3 uv2;
|
|
out vec4 _fragColor;
|
|
void main() {
|
|
vec4 g1 = textureGrad(tex,uv1.xy,dFdx(uv1.xy),dFdy(uv1.xy)); // mediump UV
|
|
vec4 g2 = textureGrad(tex,uv2.xy,dFdx(uv2.xy),dFdy(uv2.xy)); // highp UV
|
|
vec4 g3 = textureGrad(tex,uv2.xy,uv1.xy,uv1.xy); // mediump gradient
|
|
_fragColor = g1 + g2 + g3;
|
|
}
|