A dumb question

Posted By: Ran Man

A dumb question - 03/28/07 22:27

Hi,

I'm trying to learn shaders now and I have a basic question about them.

Okay so, the way I understand it, shaders only affect entities, right?

That means that I would have to make everything in my level either a .mdl or a .hmp, or a .wmb file to make the shaders appear on them.

Do I understand this correctly?

Shaders do not work on blocks, unless they are made an entity by a .wmb file, right?

Or else, how would I assign a material to them? Aggghh, i don't get it.
Posted By: Uhrwerk

Re: A dumb question - 03/28/07 22:54

Quote:

Shaders do not work on blocks, unless they are made an entity by a .wmb file, right?



No, that's not right. You can assign a material, and therefore even a fixed function effect or a shader to blocks. You have to write a material, whos name exactly matches the name of the texture you want to affect. Then you need to set d3d_automaterial to 1 before loading a level. The material definition will the be applied to all surfaces that have the texture with the same name assigned.

However, this will be significantly slow. I recommend to use ffes andshaders exclusively for models (.mdl) and sprites.
Posted By: Ran Man

Re: A dumb question - 03/28/07 23:18

Aha!

Thanks for pointing that out.
I see it in the manual now.

I gave you 5 stars.

Posted By: Uhrwerk

Re: A dumb question - 03/29/07 21:04

Thank you! That was an easy one...
© 2024 lite-C Forums