Hello,
I’m currently having problems rendering a custom shader using RawShaderMaterial.
I’m trying to render a shader with a diffuse texture and an additive emission texture. I’m loading the textures using a THREE.TextureLoader and set _BaseMap and _EmissionMap as uniform { value { THREE.Texture(.image) }}
I stripped my frag shader down to these few lines:
#version 300 es
precision highp float;
precision highp int;
uniform mediump sampler2D _BaseMap;
uniform mediump sampler2D _EmissionMap;
in highp vec2 vs_TEXCOORD0;
out highp vec4 SV_Target0;
vec4 u_xlat1;
void main()
{
SV_Target0.xyz = texture(_EmissionMap, vs_TEXCOORD0.xy).xyz;
SV_Target0.w = 1.0;
return;
}
When i run it like this it is just black. Running it with texture(_BaseMap it works correctly.
I’m not sure what I’m missing, maybe someone could point me in the right direction! Thanks a lot
Current version of threejs: 0.134.0
Just in case it is useful here are the uniforms that are currently set - maybe there is a problem as well?