Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003882Zandronum[All Projects] Bugpublic2021-02-23 20:102025-05-05 14:17
ReporterTDRR 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version3.1-beta 
Target VersionFixed in Version 
Summary0003882: GLDEFS HardwareShader: passing texture uniform is non-functional
DescriptionTitle sums it up, pretty much. The syntax
HardwareShader "TEXTNAME"
{
    Shader "shader.fp"
    Texture uniformname "texturename"
}
properly assigns a shader to the TEXTNAME texture, but Texture uniformname "texturename" doesn't set the uniform sampler2D uniformname to the corresponding texture. The game doesn't crash on startup or anything, the texture is just pitch black.
Attached Files? file icon ShaderTextureUniformTest.pk3 [^] (8,968 bytes) 2021-02-23 23:47

- Relationships

-  Notes
User avatar (0021603)
TDRR (reporter)
2021-02-23 23:47

To add to this, the issue never got fixed in GZDoom itself, instead opting to eventually (like 4 years later) add materials.

I personally believe it's worth fixing for Zandronum 3.1, as 4.0 will likely take an extremely long time and on top of that the minimum supported OpenGL version will jump up to 2.0 (if not 3.3). A GL2-compatible version with decent shader capabilities, and on top of that shaderless GL1.4 compatibility would be fantastic, as there's no such other thing around.

Attached is a test pk3. Actor "ShaderTexTest" uses the feature, but it instead samples the main texture (which is green), not the secondary texture (which is a rainbow).
User avatar (0023705)
Codesphere (reporter)
2024-05-19 04:19

Sorry to bump this, but I second trying to fix this issue, perhaps in time for Zan 3.2. From what I could see in the Zan 3.1 source, it looks like the code to try and implement the "Texture" GLDEFS parameter in HardwareShader was simply never finished, calling glUniform1i and just passing a constant 1 to the uniform (it also is specifically looking for "texture2" as the uniform name?).

I do feel like the work for this is already half there or something, it just needs to be finished up where applicable starting in gl_shader.cpp.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: EpicTyphlosion Codesphere unknownna
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2021-02-23 20:10 TDRR New Issue
2021-02-23 23:47 TDRR File Added: ShaderTextureUniformTest.pk3
2021-02-23 23:47 TDRR Note Added: 0021603
2024-05-19 04:19 Codesphere Note Added: 0023705






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker