Removing define in material?

Well I currently have a material that has a define (Has_Colormap).

Now I can set the colormap and the shader uses the ifdefined stuff just fine.

However is there anyway to unset the colormap for example?

So that i get the version where ifdefined stuff is never ever executed?

(If i pass null I get a error from somewhere down the uniform class)

Or is there a technical limitation that I don’t completly understand, and I need to create a new Material from my j3md without setting that parameter?

I guess putting the define in an ifdef in turn could work.

It may just be a bug. I haven’t been through that code recently, though.

I think you can use the method

[java]

material.clearParam("Has_Colormap");

[/java]

1 Like
@kwando said:
I think you can use the method
[java]
material.clearParam("Has_Colormap");
[/java]

That. ^
1 Like

Ah cool, for some reason I did not see that O.o … thanks