Shader error with Umbra of Fate

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Shader error with Umbra of Fate

Re: Shader error with Umbra of Fate

by dpJudas » Thu May 09, 2019 10:36 am

This ticket can be closed now, right? The errors in the shaders were fixed by YukiRaven and the error messages have been improved so it is more clear which shader has a problem.

Re: Shader error with Umbra of Fate

by YukiRaven » Sun Apr 28, 2019 3:25 am

Forgot to reply to this, sorry.

I just tested with 4.1 and the changes I made (which were super small: remove the "uniform sampler2D tex;" declaration and switch to using "InputTexture" where needed) allow it to run.

I'm having different issues now, but I'll make a new thread for them. I'll also get updates for Umbra of Fate and Freaky Panties pushed to my website sometime soon.

Re: Shader error with Umbra of Fate

by Nash » Fri Apr 19, 2019 3:00 am

YukiRaven wrote:So I can't even get the Vulkan renderer to work with UoF on my system. X11 completely hangs until I log in through SSH and force kill the process from the command line. No error messages, it just hangs after "TITLEMAP - Umbra of Fate Title Map" is shown in the terminal.

I did go through the shaders and removed the duplicate declaration, though, then switched to using InputTexture. Nothing breaks in OpenGL. If someone else can confirm this fixes it in Vulkan, I'll push a new release to my website with the fixed shaders.
Care to post the relevant changes in which file? I'll do a local edit and test with a fresh pull of the latest vulkan2 branch to confirm.

Re: Shader error with Umbra of Fate

by YukiRaven » Thu Apr 18, 2019 4:34 pm

So I can't even get the Vulkan renderer to work with UoF on my system. X11 completely hangs until I log in through SSH and force kill the process from the command line. No error messages, it just hangs after "TITLEMAP - Umbra of Fate Title Map" is shown in the terminal.

I did go through the shaders and removed the duplicate declaration, though, then switched to using InputTexture. Nothing breaks in OpenGL. If someone else can confirm this fixes it in Vulkan, I'll push a new release to my website with the fixed shaders.

Re: Shader error with Umbra of Fate

by dpJudas » Thu Apr 18, 2019 3:07 pm

The GLDEFS page is unfortunately not very good. I really should try create an account on the wiki one day and rewrite the section on shaders.

What worries me here is how many other mods might have made this mistake, since OpenGL didn't complain about it. The 'tex' sampler only exists for hardware/material shaders and not post process shaders. For post process the sampler is called 'InputTexture'. Even for hardware shaders this actually declares the sampler twice, which apparently no GLSL compiler in the past disliked.

Re: Shader error with Umbra of Fate

by YukiRaven » Thu Apr 18, 2019 2:48 pm

For one, don't download it from idgames. That's a super old version, and I don't upload to idgames anymore :^) Always grab my mods from here instead: http://alexa.partition36.com/games-and-mods/doom/

First, a note: I am very noob-ish when it comes to GLSL shaders. Bear with me here.

I think I missed that the sampler2D tex was always available when I read through the wiki when writing these. I should be able to just remove that uniform, right? Though "It is pure luck the shader even works in OpenGL as postprocess never binds 'uniform sampler2D tex;' to anything." kind of concerns me here. This contradicts what I see on the wiki where it says it's always available.

Also, do these error messages not report which shader failed to compile?

Re: Shader error with Umbra of Fate

by dpJudas » Wed Apr 17, 2019 5:19 pm

This is a shader error. Both shaders attempts to declare its own uniforms, which is not allowed. I'm not sure if very old hardware shaders allowed this, so I added some code removing declarations of 'tex' and 'timer'.

For postprocess shaders it has never been allowed. It is pure luck the shader even works in OpenGL as postprocess never binds 'uniform sampler2D tex;' to anything.

I'm not sure what is the best thing to do here since the error message may be a little confusing. Ideally GZDoom should detect if the uniform keyword is used outside a comment and write it is forbidden for the shader to declare its own input. They are either built-in uniforms or to be declared in GLDEFS.

Shader error with Umbra of Fate

by Nash » Wed Apr 17, 2019 4:10 pm



Using homebrew executable with latest vulkan2 branch.

Mod download: https://www.doomworld.com/idgames/level ... ts/s-u/uof

Top