Texture displacement togglable by a CVAR?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

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.
Posts: 9
Joined: Mon Oct 28, 2019 3:57 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Sosnowiec, Silesia, Poland

Texture displacement togglable by a CVAR?

Post by KUBA18i »

I'm playing around with shaders, namely the one from this thread. It allows me to give flat textures actual depth, and I like it. However, it's effects give off a strange vibe of warping around dependending on the player's position and movement, so I want to be able to disable the effect without just removing the code from the PK3.

The code is controlled by GLDefs definitions which call upon a shader file, for those interested it goes like this:
Now, I have defined a CVAR for the job, like so:

Code: Select all

user bool JM_texdisp = true;
I tried putting the whole shader code under a bracket that goes like

Code: Select all

but that just crashed the game :mrgreen:

Any help would be appreciated. If there are commands to control aspects of things like this already, I would like to know them(I couldn't find them, and the article on CVARs on the wiki seems to be a bit out of date). So far, the only way to change how deep the displacement gets is editing the PNG itself.

Return to “Assets (and other stuff)”