Ability to use brightmaps and texture shaders simultaneously

Moderator: GZDoom Developers

User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Ability to use brightmaps and texture shaders simultaneously

Post by Marisa the Magician »

I want to do a pulsing glow effect on an item (like UT pickups) but at the same time I don't want to lose the brightmapped parts.

Would it be difficult to make it so a texture shader with a custom ProcessLight can still sample the brightmap? At the moment it seems sampling from brighttexture just returns nothing.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Ability to use brightmaps and texture shaders simultaneo

Post by Graf Zahl »

The problem here is: The brightmap *IS* a texture shader! You cannot use two at the same time.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Ability to use brightmaps and texture shaders simultaneo

Post by Marisa the Magician »

True, but in the custom ProcessLight I should still be able to access the brighttexture sampler and do what the original brightmap texture shader does, then add the extra effect on top.

I suppose it's not bound in this case.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Ability to use brightmaps and texture shaders simultaneo

Post by Graf Zahl »

No. This will have to wait anyway, because as things are there's far too many shaders being created already. I can't say if it makes sense, for example, to lump all texture shaders into a large switch/case block instead. On OpenGL you can change shaders on the fly, but on Vulkan you will need a complete pipeline object for each shader, possibly multiple ones, if other static pipeline components also need changing. I'm still in the very early stages of investigating Vulkan, so I do not want to make things more difficult then necessary by adding more complexity.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Ability to use brightmaps and texture shaders simultaneo

Post by Marisa the Magician »

Ah, I expected it would come to this. I'll see about some workaround in the meantime.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49130
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Ability to use brightmaps and texture shaders simultaneo

Post by Graf Zahl »

Considering that I refactored the brightmap into the main shader this should be possible now.

Return to “Closed Feature Suggestions [GZDoom]”