M
Misu
Guest
I am working on a very complex shader as an experiment with 3D shadering. At this point, the shader I wrote came out excellent base on my calculations. However, it is not working. I tried testing out each algorithm in the fragment shader to see which line is working or not, and I reach my conclusion where my shader is not picking up any color value from my sampler image. I tried minimalizing my code (where it only uses the sampler and the base texture alone) to see if it is the formatting that I got wrong. I tried running this short code to see if it does any changes to my screen...
It does not do anything. It shows me the screen the same as without the shader. I ask someone for help but he told me that I wrote it just fine. I dunno why it isnt working. Im using a 2D rendered image made from surface. I need to know what am I doing wrong or what possible way I can do to solve this or a way to pick up a color value from my sampler.
Im using GMS 1.4
Code:
uniform sampler2D render;
varying vec4 vCol;
varying vec2 vTex;
void main()
{
vec4 img = vCol * texture2D(render,vTex);
gl_FragColor = vec4(img) * texture2D(gm_BaseTexture,vTex);
}
Im using GMS 1.4