Ability to use brightmaps and texture shaders simultaneously

These are not rejected - but are not considered highly important right now.

Moderator: GZDoom Developers

Ability to use brightmaps and texture shaders simultaneously

Postby Marisa Kirisame » Sat May 19, 2018 5:26 am

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
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Ability to use brightmaps and texture shaders simultaneo

Postby Graf Zahl » Sat May 19, 2018 6:11 am

The problem here is: The brightmap *IS* a texture shader! You cannot use two at the same time.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Ability to use brightmaps and texture shaders simultaneo

Postby Marisa Kirisame » Sat May 19, 2018 6:55 am

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
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Ability to use brightmaps and texture shaders simultaneo

Postby Graf Zahl » Sat May 19, 2018 7:17 am

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Ability to use brightmaps and texture shaders simultaneo

Postby Marisa Kirisame » Sat May 19, 2018 7:47 am

Ah, I expected it would come to this. I'll see about some workaround in the meantime.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support


Return to On Hold Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest