Glitching brightmaps

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
ATDynaX
Posts: 19
Joined: Mon Mar 04, 2024 11:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)

Glitching brightmaps

Post by ATDynaX »

I made brightmaps for OTEX Lava textures but when i turn down the light the brightmap is totally glitchy. And th glitchy texture is the same on both.
I use UZDoom 4.14.3
User avatar
Kappes Buur
 
 
Posts: 4252
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada

Re: Glitching brightmaps

Post by Kappes Buur »

Are the brightmap images done in b/w or color?
ATDynaX
Posts: 19
Joined: Mon Mar 04, 2024 11:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)

Re: Glitching brightmaps

Post by ATDynaX »

Kappes Buur wrote: Sat Jul 11, 2026 7:44 pm Are the brightmap images done in b/w or color?
They are in black and white. If I turn down the brightness i can see a glitchy pattern across several different brightmaps. One is animated the other one isn't. I wshed i could just send a screenshot.
You do not have the required permissions to view the files attached to this post.
User avatar
Darkcrafter
Posts: 595
Joined: Sat Sep 23, 2017 8:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: Glitching brightmaps

Post by Darkcrafter »

Also send you brightmap definitions. Btw, I found modern GZDoom buggy in terms of brightmaps like they're not applied to flats when hires textures are there. Had the same issue with my legacy GL1x/GL2x brightmaps in LZDoom07, could try to dig it in the code of modern GZDoom/UZDoom but later, my brain barely burned with those 3D line portals hehe.

Oh wait, it does work with hires textures but as soon as I apply my custom parallax shader, it goes off. So maybe the reason here is a shader?
User avatar
Enjay
 
 
Posts: 27683
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Glitching brightmaps

Post by Enjay »

I could be wrong here, but I have a recollection that you can only apply one shader to a surface at any one time. I *think* *ZDoom uses its internal rendering shaders to process brightmaps. So, by using a brightmap and a parallax shader, you might be running into the one shader per surface thing. (That's if I'm remembering things correctly of course.)
ATDynaX
Posts: 19
Joined: Mon Mar 04, 2024 11:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)

Re: Glitching brightmaps

Post by ATDynaX »

I put the brightmaps between F_START and F_END and defined them in Animdefs. That'S the problem. I put them below Endmap and not within any Flat markers.
User avatar
Darkcrafter
Posts: 595
Joined: Sat Sep 23, 2017 8:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: Glitching brightmaps

Post by Darkcrafter »

ATDynaX wrote: Mon Jul 13, 2026 11:52 pm I put the brightmaps between F_START and F_END and defined them in Animdefs. That'S the problem. I put them below Endmap and not within any Flat markers.
And that's wrong way too perhaps. You need to define them in special lump.

Call it "gldefs", you may give it a "bm" extension to look more pro like "gldefs.bm" Look how it's done in NightFright's brightmap collection:

/filter/doom.id.doom2/gldefs.bm:

Code: Select all

// Brightmaps for vanilla sprites
#include brightmaps/sprites/doom.bm
#include brightmaps/sprites/doom2.bm

// Brightmaps for textures
#include brightmaps/textures/doom_textures.bm
#include brightmaps/textures/doom2_textures.bm

// Brightmaps for flats
#include brightmaps/textures/doom_flats.bm
#include brightmaps/textures/doom2_flats.bm
/brightmaps/textures/doom2/

Code: Select all

brightmap texture bfall1   { map "brightmaps/textures/doom2/bfall1.png"  iwad }
... and so on
iwad means it can work ONLY with the original IWADs without mods and hires packs, so you can comment it out or remove completely:

Code: Select all

brightmap texture bfall1   { map "brightmaps/textures/doom2/bfall1.png"  /* iwad */  }
or like that

Code: Select all

brightmap texture bfall1   { map "brightmaps/textures/doom2/bfall1.png"  }

But you can do it even simpler, just create a gldefs.bm lump and write there:

Code: Select all

brightmap texture bfall1   { map "brightmaps/textures/doom2/bfall1.png"  }

Return to “Assets (and other stuff)”