Page 1 of 1

Shaders,. . passing a bitmap?

Posted: Fri Oct 03, 2008 6:05 pm
by jph_wacheski
I was working on learning more about how the shaders function and what we can do with them in ZGE, and have some questions,. .

With the current implementation can a shader link to more bitmaps than the single one selected in the material?

I was trying to get an enviro-map working however I am not sure I can use a cubemap,. ? This ability would be usefull for many things, like haveing a texture, and a bumpmap, or alphamap, etc. However it apears to me that the material is what determines the bitmap the shader can access,. is this correct?

also i attached the closest I have come to getting a nice crome effect with out a texture,. looks more like shinny plastic perhaps,. . just for interest.

Posted: Fri Oct 03, 2008 6:20 pm
by VilleK
That plastic shader looks really nice. And the model has originated from one of Kjells functions right?

You are right, the shader can only access the material texture (afaik) so we are going to need Texture2 and Texture3 properties on material in ZGE. I've made a note of this and hope to fix it for a release soon.

Posted: Fri Oct 03, 2008 8:27 pm
by Kjell
Hi guys,

Extra texture slots would be desirable for normal maps and such indeed.

Chrome is all about high reflection, low diffuse / specularity. Unfortunately, to pull this off best ( especially with objects that self-reflect ), you need to render a reflection map ( dynamically or pre-rendered ).

Here are some screenshots of a quick attempt in ZGE. I'll share the shader once I'm done tweaking.

K