Colorless texture in 3D model

My model renders okay but the pikachu is totally black :frowning: !

The relevant code is here:

The shaders I am using:

I have tried disabling/enabling lights, different shaders, many other things, nothing works. I’m really just trying to get a minimal example working. (Once I get that working, I would like to have the whole 3D scene processed by another fragment shader–how can I do that?)

I had a quick glance at your code. Might be related to the texture type. Your shader has tex0 as a sampler2D but OF loads textures as sampler2DRect by default. You could try ofDisableArbTex() before you load the image…

1 Like

Agree with Neil re sampler2DRect, also make sure your mesh has texture coordinates.

Neither changing the texture name nor using ofDisableArbTex() had an effect. I can confirm that the texture is sound, it works when I run this other project: https://github.com/Eoey1/OF-Shader-Exam