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.
Ability to use brightmaps and texture shaders simultaneously
Moderator: GZDoom Developers
-
- 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
-
- 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
The problem here is: The brightmap *IS* a texture shader! You cannot use two at the same time.
-
- 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
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.
I suppose it's not bound in this case.
-
- 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
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.
-
- 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
Ah, I expected it would come to this. I'll see about some workaround in the meantime.
-
- 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
Considering that I refactored the brightmap into the main shader this should be possible now.