User-settable UV wrapping modes for hardware shaders
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- 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
- Contact:
User-settable UV wrapping modes for hardware shaders
... or just make user textures default to wrap instead of clamp. This is kind of annoying in some cases where texture coords have to be scaled/offset to achieve some effect (e.g.: scrolling overlays, detail textures). One could just use fract() to make the coordinates wrap around, but this causes visible seams when using any texture filtering mode other than None.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: User-settable UV wrapping modes for hardware shaders
They should default to wrap. Is this for the newly added texture layers or also the base texture?
- 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
- Contact:
Re: User-settable UV wrapping modes for hardware shaders
Newly-added layers.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: User-settable UV wrapping modes for hardware shaders
Ok. Seems like this was overlooked.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: User-settable UV wrapping modes for hardware shaders
It doesn't compile, auto tex was declared below:
Code: Select all
C:\DEV\gzdlegacy\src\gl\renderer\gl_renderstate.cpp: In member function 'void FR
enderState::SetMaterial(FMaterial*, int, int, int, bool)':
C:\DEV\gzdlegacy\src\gl\renderer\gl_renderstate.cpp:452:6: error: 'tex' was not
declared in this scope
if (tex->UseType == ETextureType::SWCanvas) clampmode = CLAMP_NOFILTER;
^~~
C:\DEV\gzdlegacy\src\gl\renderer\gl_renderstate.cpp:452:6: note: suggested alter
native: 'tell'
if (tex->UseType == ETextureType::SWCanvas) clampmode = CLAMP_NOFILTER;
^~~
tell
C:\DEV\gzdlegacy\src\gl\renderer\gl_renderstate.cpp:453:6: error: 'tex' was not
declared in this scope
if (tex->bHasCanvas) clampmode = CLAMP_CAMTEX;
^~~
C:\DEV\gzdlegacy\src\gl\renderer\gl_renderstate.cpp:453:6: note: suggested alter
native: 'tell'
if (tex->bHasCanvas) clampmode = CLAMP_CAMTEX;
^~~
tell
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: User-settable UV wrapping modes for hardware shaders
Damn. Moving around those lines was a late thought and not tested.