Closed valina354 closed 3 months ago
You need to make sure you are also doing this when you are performing the multiplication with the texture after the lighting stage. That stage is done here: https://github.com/TheOverfloater/pathos-public/blob/0fcd9b765a872ac5c08346dae1282ff19e9ae0ad/pathos/sources/codesrc/engine/renderer/r_bsp.cpp#L3177
As you can see, it is setting the determinator for either "shader_main_detail" or "shader_texunit1". You need a matching version of your texture blending solution for these particular shaders as well to make this feature work with multi-pass rendering.
yup that seemed to be issue as now it shows for dlights too tho i have reached a new issue where for some reason blending is occuring on different textures where its not meant too, its only meant to show on redbrick01, but it also shows on slate floor for no reason, did add a new branch called twoblended in shader, i also tried adding an else here but for some reason it breaks the twoblended too, since you know the engine you might know why this could be happening if this is C++ related or shader @TheOverfloater
this is my bss shader btw i really dont know what to do cuz i got blending like working but it shows up on other materials that arent meant to bsprenderer.txt
and r_bsp.cpp is this maybe im just binding wrong in wrong places? i followed how mt_tx_luminance binds maybe you know how to bind correctly if im doing it wrong? r_bsp.txt
i also noticed it occurs to ao maps i added to my engine too so i think its way im binding textures, but at this point i just realized that you can probably just add 2 textures on 1 main texture so im probably gonna just do it manually to prevent all these errors
You need to make sure you are resetting the "twoblended" and "ao" determinators to 0 if you are not using them. Otherwise they will remain enabled for objects that do not need them, and you'll get blending on textures you don't want it on.
in shader its very confusing and im going crazy trying to understand, im adding two blended textures in my engine based on this and it works fine except when a dlight is there it goes away, i added to combinetexturelayers this which is fine i think and c++ part is fine but when dlight is on its just like gone, i fell like its got to do something with dlight so shadertype 5 but idk why its so strange
this is with flashlight off
and this with it on