PrismaticFlower / shaderpatch

Improved shaders (and fun stuff for modders) for Star Wars Battlefront II (2005) - Incompatible with Classic Collection
MIT License
39 stars 2 forks source link

Materials on skydome geometry #77

Closed DoctorAnsem closed 5 years ago

DoctorAnsem commented 5 years ago

Just noticed when I tried to apply an emissive material to a skydome model, it crashes the game. Is this a bug or does the sky just not support custom materials?

PrismaticFlower commented 5 years ago

All the current rendertypes only implement the shaders for lit surfaces and the SP is programmed to fast fail if a custom material attempt to use an unimplemented shader. So the crash itself happening isn't bug, however it not printing a message to the log when it happens is.

But I've actually been thinking about adding in rendertypes for custom materials. Specifically so people could use sky box textures in the game if they so desired. Obviously your use case sounds different to that so this is a great opportunity for me to ask what you would like to see from such a feature.

I gather you'd like to be able to just keep the same sky texture and overlay an emissive texture on top? Is there anything else you'd be looking for in addition to that?

DoctorAnsem commented 5 years ago

Well basically I was trying to make an emissive material for a dome model (the static models defined in .sky files) just the same as you'd do for any other object so I guess that's it. I mean it's perfectly doable with the stock shaders already, but I could use the extra control over its emissive power because the stock material gives room for only one alpha channel that has to work for both transparency and the glow map.

PrismaticFlower commented 5 years ago

Ah right, I misunderstood sorry! So you'd like just the ability to just have an unlit material with a diffuse map + emissive map? That should be doable without too much fuss.

DoctorAnsem commented 5 years ago

Yeah that's pretty much it.

PrismaticFlower commented 5 years ago

Added in latest release, see basic_unlit.