MadDeCoDeR / Classic-RBDOOM-3-BFG

DOOM: BFA (Big Freaking Anniversary) Edition (former Classic RBDoom 3 BFG) is a source port based on RBDOOM-3-BFG and enchance the experience of Ultimate DOOM, DOOM 2 and DOOM 3.
GNU General Public License v3.0
211 stars 22 forks source link

Moving the window freezes the game #119

Open Alerymin opened 11 months ago

Alerymin commented 11 months ago

Describe the bug When I move the game window on the desktop, video freezes but the game still runs and I can still interact.

To Reproduce Steps to reproduce the behavior:

  1. Start the game
  2. Set to windowed mode if it's not
  3. Get out of the mouse capture
  4. Move the window
  5. Get back to the game
  6. Now when you pres buttons you don't see anything changing

Expected behavior The game keeping displaying what it does after moving the window

Desktop (please complete the following information):

Additional context Doesn't happen, on RBDoom3BFG

MadDeCoDeR commented 11 months ago

Does by any chance RBDoom runs on Vulkan?

Alerymin commented 11 months ago

RBDoom3BFG runs on Vulkan

But DoomBFA runs on OpenGL But there are also a lot of Shader compilation issues.

Logs exported with the > operator, DoomBFA closed with SIGINT

QA Timing INIT: 000235ms

found interface lo - loopback
found interface enp4s0 - 192.168.1.12/255.255.255.0
found interface virbr1 - 10.0.2.2/255.255.255.0
found interface virbr0 - 192.168.122.1/255.255.255.0
------ Initializing File System ------
Loaded resource file _common.resources
Loaded resource file _ordered.resources
Loaded resource file _sound_pc.resources
Loaded resource file _sound_pc_en.resources
Loaded resource file _sound_pc_fr.resources
Loaded resource file _sound_pc_gr.resources
Loaded resource file _sound_pc_it.resources
Loaded resource file _sound_pc_jp.resources
Loaded resource file _sound_pc_sp.resources
Loaded resource file maps/admin.resources
Loaded resource file maps/alphalabs1.resources
Loaded resource file maps/alphalabs2.resources
Loaded resource file maps/alphalabs3.resources
Loaded resource file maps/alphalabs4.resources
Loaded resource file maps/caverns1.resources
Loaded resource file maps/caverns2.resources
Loaded resource file maps/comm1.resources
Loaded resource file maps/commoutside.resources
Loaded resource file maps/cpu.resources
Loaded resource file maps/cpuboss.resources
Loaded resource file maps/d3ctf1.resources
Loaded resource file maps/d3ctf2.resources
Loaded resource file maps/d3ctf3.resources
Loaded resource file maps/d3ctf4.resources
Loaded resource file maps/d3dm1.resources
Loaded resource file maps/d3dm2.resources
Loaded resource file maps/d3dm3.resources
Loaded resource file maps/d3dm4.resources
Loaded resource file maps/d3dm5.resources
Loaded resource file maps/d3xpdm1.resources
Loaded resource file maps/d3xpdm2.resources
Loaded resource file maps/d3xpdm3.resources
Loaded resource file maps/d3xpdm4.resources
Loaded resource file maps/delta1.resources
Loaded resource file maps/delta2a.resources
Loaded resource file maps/delta2b.resources
Loaded resource file maps/delta3.resources
Loaded resource file maps/delta4.resources
Loaded resource file maps/delta5.resources
Loaded resource file maps/deltax.resources
Loaded resource file maps/enpro.resources
Loaded resource file maps/erebus1.resources
Loaded resource file maps/erebus2.resources
Loaded resource file maps/erebus3.resources
Loaded resource file maps/erebus4.resources
Loaded resource file maps/erebus5.resources
Loaded resource file maps/erebus6.resources
Loaded resource file maps/hell.resources
Loaded resource file maps/hell1.resources
Loaded resource file maps/hellhole.resources
Loaded resource file maps/le_enpro1.resources
Loaded resource file maps/le_enpro2.resources
Loaded resource file maps/le_exis1.resources
Loaded resource file maps/le_exis2.resources
Loaded resource file maps/le_hell.resources
Loaded resource file maps/le_hell_post.resources
Loaded resource file maps/le_underground.resources
Loaded resource file maps/le_underground2.resources
Loaded resource file maps/mars_city1.resources
Loaded resource file maps/mars_city2.resources
Loaded resource file maps/mc_underground.resources
Loaded resource file maps/monorail.resources
Loaded resource file maps/phobos1.resources
Loaded resource file maps/phobos2.resources
Loaded resource file maps/phobos3.resources
Loaded resource file maps/phobos4.resources
Loaded resource file maps/recycling1.resources
Loaded resource file maps/recycling2.resources
Loaded resource file maps/site3.resources
Loaded resource file maps/zBFA.resources
Loaded resource file maps/zfixed_le_model.resources
Current search path:
/home/rathmox/.doombfa/base_BFG
/home/rathmox/.local/opt/doom-bfa/base_BFG
/home/rathmox/.doombfa/base
/home/rathmox/.local/opt/doom-bfa/base
_common.resources
_ordered.resources
_sound_pc.resources
_sound_pc_en.resources
_sound_pc_fr.resources
_sound_pc_gr.resources
_sound_pc_it.resources
_sound_pc_jp.resources
_sound_pc_sp.resources
maps/admin.resources
maps/alphalabs1.resources
maps/alphalabs2.resources
maps/alphalabs3.resources
maps/alphalabs4.resources
maps/caverns1.resources
maps/caverns2.resources
maps/comm1.resources
maps/commoutside.resources
maps/cpu.resources
maps/cpuboss.resources
maps/d3ctf1.resources
maps/d3ctf2.resources
maps/d3ctf3.resources
maps/d3ctf4.resources
maps/d3dm1.resources
maps/d3dm2.resources
maps/d3dm3.resources
maps/d3dm4.resources
maps/d3dm5.resources
maps/d3xpdm1.resources
maps/d3xpdm2.resources
maps/d3xpdm3.resources
maps/d3xpdm4.resources
maps/delta1.resources
maps/delta2a.resources
maps/delta2b.resources
maps/delta3.resources
maps/delta4.resources
maps/delta5.resources
maps/deltax.resources
maps/enpro.resources
maps/erebus1.resources
maps/erebus2.resources
maps/erebus3.resources
maps/erebus4.resources
maps/erebus5.resources
maps/erebus6.resources
maps/hell.resources
maps/hell1.resources
maps/hellhole.resources
maps/le_enpro1.resources
maps/le_enpro2.resources
maps/le_exis1.resources
maps/le_exis2.resources
maps/le_hell.resources
maps/le_hell_post.resources
maps/le_underground.resources
maps/le_underground2.resources
maps/mars_city1.resources
maps/mars_city2.resources
maps/mc_underground.resources
maps/monorail.resources
maps/phobos1.resources
maps/phobos2.resources
maps/phobos3.resources
maps/phobos4.resources
maps/recycling1.resources
maps/recycling2.resources
maps/site3.resources
maps/zBFA.resources
maps/zfixed_le_model.resources
file system initialized.
--------------------------------------
WARNING: Unable to open resource file maps/_startup.resources
----- Initializing Decls -----
------------------------------
Couldn't open journal files
/proc/cpuinfo CPU processors: 8
/proc/cpuinfo CPU logical cores: 16
execing default.cfg
execing joy_360_0.cfg
execing joy_righty.cfg
execing DBFAConfig.cfg
couldn't exec autoexec.cfg
----- R_InitOpenGL -----
WARNING: Error when trying to use Wayland: wayland not available
Reverting to the original Video Driver

Initializing OpenGL subsystem
Using 8 color bits, 24 depth, 8 stencil display
Using GLEW 2.1.0
WARNING: unknown event 336
WARNING: unknown event 336
OpenGL Version   : 4.6
OpenGL Vendor    : NVIDIA Corporation
OpenGL Renderer  : NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
OpenGL GLSL      : 4.6
   maxTextureAnisotropy: 16.000000
...using GL_ARB_direct_state_access
...using GL_EXT_texture_lod_bias
...using GL_ARB_seamless_cube_map
X..GL_GREMEDY_string_marker not found
...using GL_ARB_framebuffer_object
...using GL_EXT_framebuffer_blit
----- Initializing Render Shaders -----
While compiling fragment program renderprogs/interactionSM.ps.hlsl
-----------------
  1: // filename renderprogs/interactionSM.ps.hlsl
  2: #version 460
  3: #pragma shader_stage( fragment )
  4: #extension GL_ARB_separate_shader_objects : enable
  5: 
  6: void clip( float v ) { if ( v < 0.0 ) { discard; } }
  7: void clip( vec2 v ) { if ( any( lessThan( v, vec2( 0.0 ) ) ) ) { discard; } }
  8: void clip( vec3 v ) { if ( any( lessThan( v, vec3( 0.0 ) ) ) ) { discard; } }
  9: void clip( vec4 v ) { if ( any( lessThan( v, vec4( 0.0 ) ) ) ) { discard; } }
 10: 
 11: float saturate( float v ) { return clamp( v, 0.0, 1.0 ); }
 12: vec2 saturate( vec2 v ) { return clamp( v, 0.0, 1.0 ); }
 13: vec3 saturate( vec3 v ) { return clamp( v, 0.0, 1.0 ); }
 14: vec4 saturate( vec4 v ) { return clamp( v, 0.0, 1.0 ); }
 15: 
 16: 
 17: uniform vec4 _fa_[30];
 18: 
 19: float dot3 (vec3 a , vec3 b ) {return dot ( a , b ) ; }
 20: float dot3 (vec3 a , vec4 b ) {return dot ( a , b. xyz ) ; }
 21: float dot3 (vec4 a , vec3 b ) {return dot ( a. xyz , b ) ; }
 22: float dot3 (vec4 a , vec4 b ) {return dot ( a. xyz , b. xyz ) ; }
 23: float dot4 (vec4 a , vec4 b ) {return dot ( a , b ) ; }
 24: float dot4 (vec2 a , vec4 b ) {return dot ( vec4 ( a , 0 , 1 ) , b ) ; }
 25: vec3 sRGBToLinearRGB (vec3 rgb ) {
 26:    return rgb ;
 27: }
 28: vec4 sRGBAToLinearRGBA (vec4 rgba ) {
 29:    return rgba ;
 30: }
 31: const vec4 matrixCoCg1YtoRGB1X = vec4( 1.0, -1.0, 0.0, 1.0 );
 32: const vec4 matrixCoCg1YtoRGB1Y = vec4( 0.0, 1.0, -0.50196078, 1.0 );
 33: const vec4 matrixCoCg1YtoRGB1Z = vec4( -1.0, -1.0, 1.00392156, 1.0 );
 34: vec3 ConvertYCoCgToRGB (vec4 YCoCg ) {
 35:    vec3 rgbColor ;
 36:    YCoCg. z = ( YCoCg. z * 31.875 ) + 1.0 ;
 37:    YCoCg. z = 1.0 / YCoCg. z ;
 38:    YCoCg. xy *= YCoCg. z ;
 39:    rgbColor. x = dot4 ( YCoCg , matrixCoCg1YtoRGB1X ) ;
 40:    rgbColor. y = dot4 ( YCoCg , matrixCoCg1YtoRGB1Y ) ;
 41:    rgbColor. z = dot4 ( YCoCg , matrixCoCg1YtoRGB1Z ) ;
 42:    return rgbColor ;
 43: }
 44: vec4 idtex2Dproj (sampler2D samp , vec4 texCoords ) {return textureProj ( samp , texCoords. xyw ) ; }
 45: uniform sampler2D samp0;
 46: uniform sampler2D samp1;
 47: uniform sampler2D samp2;
 48: uniform sampler2D samp3;
 49: uniform sampler2D samp4;
 50: uniform sampler2DArrayShadow samp5;
 51: uniform sampler2D samp6;
 52: 
 53: in vec4 vofi_TexCoord0;
 54: in vec4 vofi_TexCoord1;
 55: in vec4 vofi_TexCoord2;
 56: in vec4 vofi_TexCoord3;
 57: in vec4 vofi_TexCoord4;
 58: in vec4 vofi_TexCoord5;
 59: in vec4 vofi_TexCoord6;
 60: in vec4 vofi_TexCoord7;
 61: in vec4 vofi_TexCoord8;
 62: in vec4 vofi_TexCoord9;
 63: in vec4 vofi_Color;
 64: 
 65: out vec4 fo_FragColor;
 66: 
 67: void main() {
 68:    vec4 bumpMap = texture ( samp0 , vofi_TexCoord1 . xy ) ;
 69:    vec4 lightFalloff = ( idtex2Dproj ( samp3 , vofi_TexCoord2 ) ) ;
 70:    vec4 lightProj = ( idtex2Dproj ( samp4 , vofi_TexCoord3 ) ) ;
 71:    vec4 YCoCG = texture ( samp2 , vofi_TexCoord4 . xy ) ;
 72:    vec4 specMapSRGB = texture ( samp1 , vofi_TexCoord5 . xy ) ;
 73:    vec4 specMap = sRGBAToLinearRGBA ( specMapSRGB ) ;
 74:    vec3 lightVector = normalize ( vofi_TexCoord0 . xyz ) ;
 75:    vec3 viewVector = normalize ( vofi_TexCoord6 . xyz ) ;
 76:    vec3 diffuseMap = sRGBToLinearRGB ( ConvertYCoCgToRGB ( YCoCG ) ) ;
 77:    vec3 localNormal ;
 78:    localNormal. xy = bumpMap. wy - 0.5 ;
 79:    localNormal. z = sqrt ( abs ( dot ( localNormal. xy , localNormal. xy ) - 0.25 ) ) ;
 80:    localNormal = normalize ( localNormal ) ;
 81:    float ldotN = saturate ( dot3 ( localNormal , lightVector ) ) ;
 82:    float lambert = ldotN ;
 83:    int shadowIndex = 0 ;
 84:    vec4 shadowMatrixX = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 0 ) ] ;
 85:    vec4 shadowMatrixY = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 1 ) ] ;
 86:    vec4 shadowMatrixZ = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 2 ) ] ;
 87:    vec4 shadowMatrixW = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 3 ) ] ;
 88:    vec4 modelPosition = vec4 ( vofi_TexCoord7 . xyz , 1.0 ) ;
 89:    vec4 shadowTexcoord ;
 90:    shadowTexcoord. x = dot4 ( modelPosition , shadowMatrixX ) ;
 91:    shadowTexcoord. y = dot4 ( modelPosition , shadowMatrixY ) ;
 92:    shadowTexcoord. z = dot4 ( modelPosition , shadowMatrixZ ) ;
 93:    shadowTexcoord. w = dot4 ( modelPosition , shadowMatrixW ) ;
 94:    float bias = 0.001 * tan ( acos ( ldotN ) ) ;
 95:    bias = clamp ( bias , 0 , 0.01 ) ;
 96:    shadowTexcoord. xyz /= shadowTexcoord. w ;
 97:    shadowTexcoord. z = shadowTexcoord. z * _fa_[0 /* rpScreenCorrectionFactor */] . w ;
 98:    shadowTexcoord. z = shadowTexcoord. z - bias ;
 99:    shadowTexcoord. w = float ( shadowIndex ) ;
100:    vec2 poissonDisk [ 12 ] = vec2 [ ] (
101:    vec2 ( 0.6111618 , 0.1050905 ) ,
102:    vec2 ( 0.1088336 , 0.1127091 ) ,
103:    vec2 ( 0.3030421 , - 0.6292974 ) ,
104:    vec2 ( 0.4090526 , 0.6716492 ) ,
105:    vec2 ( - 0.1608387 , - 0.3867823 ) ,
106:    vec2 ( 0.7685862 , - 0.6118501 ) ,
107:    vec2 ( - 0.1935026 , - 0.856501 ) ,
108:    vec2 ( - 0.4028573 , 0.07754025 ) ,
109:    vec2 ( - 0.6411021 , - 0.4748057 ) ,
110:    vec2 ( - 0.1314865 , 0.8404058 ) ,
111:    vec2 ( - 0.7005203 , 0.4596822 ) ,
112:    vec2 ( - 0.9713828 , - 0.06329931 ) ) ;
113:    float shadow = 0.0 ;
114:    float numSamples = 12.0 ;
115:    float stepSize = 1.0 / numSamples ;
116:    vec4 jitterTC = ( gl_FragCoord * _fa_[0 /* rpScreenCorrectionFactor */] ) + _fa_[4 /* rpJitterTexOffset */] ;
117:    vec4 random = texture ( samp6 , jitterTC. xy ) * 3.14159265358979323846 ;
118:    vec2 rot ;
119:    rot. x = cos ( random. x ) ;
120:    rot. y = sin ( random. x ) ;
121:    float shadowTexelSize = _fa_[0 /* rpScreenCorrectionFactor */] . z * _fa_[3 /* rpJitterTexScale */] . x ;
122:    for ( int i = 0 ; i < 12 ; i ++ )
123:    {
124:        vec2 jitter = poissonDisk [ i ] ;
125:        vec2 jitterRotated ;
126:        jitterRotated. x = jitter. x * rot. x - jitter. y * rot. y ;
127:        jitterRotated. y = jitter. x * rot. y + jitter. y * rot. x ;
128:        vec4 shadowTexcoordJittered = vec4 ( shadowTexcoord. xy + jitterRotated * shadowTexelSize , shadowTexcoord. z , shadowTexcoord. w ) ;
129:        shadow += texture ( samp5 , shadowTexcoordJittered. xywz ) ;
130:    }
131:    shadow *= stepSize ;
132:    vec3 halfAngleVector = normalize ( lightVector + viewVector ) ;
133:    float hdotN = clamp ( dot3 ( halfAngleVector , localNormal ) , 0.0 , 1.0 ) ;
134:    float specularPower = 10.0 ;
135:    vec3 specularContribution = vec3 ( pow ( hdotN , specularPower ) ) ;
136:    vec3 diffuseColor = diffuseMap * sRGBToLinearRGB ( _fa_[1 /* rpDiffuseModifier */] . xyz ) ;
137:    vec3 specularColor = specMap. xyz * specularContribution * sRGBToLinearRGB ( _fa_[2 /* rpSpecularModifier */] . xyz ) ;
138:    vec3 lightColor = sRGBToLinearRGB ( lightProj. xyz * lightFalloff. xyz ) ;
139:    fo_FragColor . xyz = ( diffuseColor + specularColor ) * lambert * lightColor * vofi_Color . rgb * shadow ;
140:    fo_FragColor . w = 1.0 ;
141: }
-----------------
0(95) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
    (0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
    (0) : float clamp(float, float, float)

While compiling fragment program renderprogs/interactionSM.ps.hlsl
-----------------
  1: // filename renderprogs/interactionSM.ps.hlsl
  2: #version 460
  3: #pragma shader_stage( fragment )
  4: #extension GL_ARB_separate_shader_objects : enable
  5: 
  6: void clip( float v ) { if ( v < 0.0 ) { discard; } }
  7: void clip( vec2 v ) { if ( any( lessThan( v, vec2( 0.0 ) ) ) ) { discard; } }
  8: void clip( vec3 v ) { if ( any( lessThan( v, vec3( 0.0 ) ) ) ) { discard; } }
  9: void clip( vec4 v ) { if ( any( lessThan( v, vec4( 0.0 ) ) ) ) { discard; } }
 10: 
 11: float saturate( float v ) { return clamp( v, 0.0, 1.0 ); }
 12: vec2 saturate( vec2 v ) { return clamp( v, 0.0, 1.0 ); }
 13: vec3 saturate( vec3 v ) { return clamp( v, 0.0, 1.0 ); }
 14: vec4 saturate( vec4 v ) { return clamp( v, 0.0, 1.0 ); }
 15: 
 16: 
 17: uniform vec4 _fa_[30];
 18: 
 19: float dot3 (vec3 a , vec3 b ) {return dot ( a , b ) ; }
 20: float dot3 (vec3 a , vec4 b ) {return dot ( a , b. xyz ) ; }
 21: float dot3 (vec4 a , vec3 b ) {return dot ( a. xyz , b ) ; }
 22: float dot3 (vec4 a , vec4 b ) {return dot ( a. xyz , b. xyz ) ; }
 23: float dot4 (vec4 a , vec4 b ) {return dot ( a , b ) ; }
 24: float dot4 (vec2 a , vec4 b ) {return dot ( vec4 ( a , 0 , 1 ) , b ) ; }
 25: vec3 sRGBToLinearRGB (vec3 rgb ) {
 26:    return rgb ;
 27: }
 28: vec4 sRGBAToLinearRGBA (vec4 rgba ) {
 29:    return rgba ;
 30: }
 31: const vec4 matrixCoCg1YtoRGB1X = vec4( 1.0, -1.0, 0.0, 1.0 );
 32: const vec4 matrixCoCg1YtoRGB1Y = vec4( 0.0, 1.0, -0.50196078, 1.0 );
 33: const vec4 matrixCoCg1YtoRGB1Z = vec4( -1.0, -1.0, 1.00392156, 1.0 );
 34: vec3 ConvertYCoCgToRGB (vec4 YCoCg ) {
 35:    vec3 rgbColor ;
 36:    YCoCg. z = ( YCoCg. z * 31.875 ) + 1.0 ;
 37:    YCoCg. z = 1.0 / YCoCg. z ;
 38:    YCoCg. xy *= YCoCg. z ;
 39:    rgbColor. x = dot4 ( YCoCg , matrixCoCg1YtoRGB1X ) ;
 40:    rgbColor. y = dot4 ( YCoCg , matrixCoCg1YtoRGB1Y ) ;
 41:    rgbColor. z = dot4 ( YCoCg , matrixCoCg1YtoRGB1Z ) ;
 42:    return rgbColor ;
 43: }
 44: vec4 idtex2Dproj (sampler2D samp , vec4 texCoords ) {return textureProj ( samp , texCoords. xyw ) ; }
 45: uniform sampler2D samp0;
 46: uniform sampler2D samp1;
 47: uniform sampler2D samp2;
 48: uniform sampler2D samp3;
 49: uniform sampler2D samp4;
 50: uniform sampler2DArrayShadow samp5;
 51: uniform sampler2D samp6;
 52: 
 53: in vec4 vofi_TexCoord0;
 54: in vec4 vofi_TexCoord1;
 55: in vec4 vofi_TexCoord2;
 56: in vec4 vofi_TexCoord3;
 57: in vec4 vofi_TexCoord4;
 58: in vec4 vofi_TexCoord5;
 59: in vec4 vofi_TexCoord6;
 60: in vec4 vofi_TexCoord7;
 61: in vec4 vofi_TexCoord8;
 62: in vec4 vofi_TexCoord9;
 63: in vec4 vofi_Color;
 64: 
 65: out vec4 fo_FragColor;
 66: 
 67: void main() {
 68:    vec4 bumpMap = texture ( samp0 , vofi_TexCoord1 . xy ) ;
 69:    vec4 lightFalloff = ( idtex2Dproj ( samp3 , vofi_TexCoord2 ) ) ;
 70:    vec4 lightProj = ( idtex2Dproj ( samp4 , vofi_TexCoord3 ) ) ;
 71:    vec4 YCoCG = texture ( samp2 , vofi_TexCoord4 . xy ) ;
 72:    vec4 specMapSRGB = texture ( samp1 , vofi_TexCoord5 . xy ) ;
 73:    vec4 specMap = sRGBAToLinearRGBA ( specMapSRGB ) ;
 74:    vec3 lightVector = normalize ( vofi_TexCoord0 . xyz ) ;
 75:    vec3 viewVector = normalize ( vofi_TexCoord6 . xyz ) ;
 76:    vec3 diffuseMap = sRGBToLinearRGB ( ConvertYCoCgToRGB ( YCoCG ) ) ;
 77:    vec3 localNormal ;
 78:    localNormal. xy = bumpMap. wy - 0.5 ;
 79:    localNormal. z = sqrt ( abs ( dot ( localNormal. xy , localNormal. xy ) - 0.25 ) ) ;
 80:    localNormal = normalize ( localNormal ) ;
 81:    float ldotN = saturate ( dot3 ( localNormal , lightVector ) ) ;
 82:    float lambert = ldotN ;
 83:    int shadowIndex = 0 ;
 84:    vec4 shadowMatrixX = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 0 ) ] ;
 85:    vec4 shadowMatrixY = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 1 ) ] ;
 86:    vec4 shadowMatrixZ = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 2 ) ] ;
 87:    vec4 shadowMatrixW = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 3 ) ] ;
 88:    vec4 modelPosition = vec4 ( vofi_TexCoord7 . xyz , 1.0 ) ;
 89:    vec4 shadowTexcoord ;
 90:    shadowTexcoord. x = dot4 ( modelPosition , shadowMatrixX ) ;
 91:    shadowTexcoord. y = dot4 ( modelPosition , shadowMatrixY ) ;
 92:    shadowTexcoord. z = dot4 ( modelPosition , shadowMatrixZ ) ;
 93:    shadowTexcoord. w = dot4 ( modelPosition , shadowMatrixW ) ;
 94:    float bias = 0.001 * tan ( acos ( ldotN ) ) ;
 95:    bias = clamp ( bias , 0 , 0.01 ) ;
 96:    shadowTexcoord. xyz /= shadowTexcoord. w ;
 97:    shadowTexcoord. z = shadowTexcoord. z * _fa_[0 /* rpScreenCorrectionFactor */] . w ;
 98:    shadowTexcoord. z = shadowTexcoord. z - bias ;
 99:    shadowTexcoord. w = float ( shadowIndex ) ;
100:    vec2 poissonDisk [ 12 ] = vec2 [ ] (
101:    vec2 ( 0.6111618 , 0.1050905 ) ,
102:    vec2 ( 0.1088336 , 0.1127091 ) ,
103:    vec2 ( 0.3030421 , - 0.6292974 ) ,
104:    vec2 ( 0.4090526 , 0.6716492 ) ,
105:    vec2 ( - 0.1608387 , - 0.3867823 ) ,
106:    vec2 ( 0.7685862 , - 0.6118501 ) ,
107:    vec2 ( - 0.1935026 , - 0.856501 ) ,
108:    vec2 ( - 0.4028573 , 0.07754025 ) ,
109:    vec2 ( - 0.6411021 , - 0.4748057 ) ,
110:    vec2 ( - 0.1314865 , 0.8404058 ) ,
111:    vec2 ( - 0.7005203 , 0.4596822 ) ,
112:    vec2 ( - 0.9713828 , - 0.06329931 ) ) ;
113:    float shadow = 0.0 ;
114:    float numSamples = 12.0 ;
115:    float stepSize = 1.0 / numSamples ;
116:    vec4 jitterTC = ( gl_FragCoord * _fa_[0 /* rpScreenCorrectionFactor */] ) + _fa_[4 /* rpJitterTexOffset */] ;
117:    vec4 random = texture ( samp6 , jitterTC. xy ) * 3.14159265358979323846 ;
118:    vec2 rot ;
119:    rot. x = cos ( random. x ) ;
120:    rot. y = sin ( random. x ) ;
121:    float shadowTexelSize = _fa_[0 /* rpScreenCorrectionFactor */] . z * _fa_[3 /* rpJitterTexScale */] . x ;
122:    for ( int i = 0 ; i < 12 ; i ++ )
123:    {
124:        vec2 jitter = poissonDisk [ i ] ;
125:        vec2 jitterRotated ;
126:        jitterRotated. x = jitter. x * rot. x - jitter. y * rot. y ;
127:        jitterRotated. y = jitter. x * rot. y + jitter. y * rot. x ;
128:        vec4 shadowTexcoordJittered = vec4 ( shadowTexcoord. xy + jitterRotated * shadowTexelSize , shadowTexcoord. z , shadowTexcoord. w ) ;
129:        shadow += texture ( samp5 , shadowTexcoordJittered. xywz ) ;
130:    }
131:    shadow *= stepSize ;
132:    vec3 halfAngleVector = normalize ( lightVector + viewVector ) ;
133:    float hdotN = clamp ( dot3 ( halfAngleVector , localNormal ) , 0.0 , 1.0 ) ;
134:    float specularPower = 10.0 ;
135:    vec3 specularContribution = vec3 ( pow ( hdotN , specularPower ) ) ;
136:    vec3 diffuseColor = diffuseMap * sRGBToLinearRGB ( _fa_[1 /* rpDiffuseModifier */] . xyz ) ;
137:    vec3 specularColor = specMap. xyz * specularContribution * sRGBToLinearRGB ( _fa_[2 /* rpSpecularModifier */] . xyz ) ;
138:    vec3 lightColor = sRGBToLinearRGB ( lightProj. xyz * lightFalloff. xyz ) ;
139:    fo_FragColor . xyz = ( diffuseColor + specularColor ) * lambert * lightColor * vofi_Color . rgb * shadow ;
140:    fo_FragColor . w = 1.0 ;
141: }
-----------------
0(95) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
    (0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
    (0) : float clamp(float, float, float)

While compiling fragment program renderprogs/interactionSM.ps.hlsl
-----------------
  1: // filename renderprogs/interactionSM.ps.hlsl
  2: #version 460
  3: #pragma shader_stage( fragment )
  4: #extension GL_ARB_separate_shader_objects : enable
  5: 
  6: void clip( float v ) { if ( v < 0.0 ) { discard; } }
  7: void clip( vec2 v ) { if ( any( lessThan( v, vec2( 0.0 ) ) ) ) { discard; } }
  8: void clip( vec3 v ) { if ( any( lessThan( v, vec3( 0.0 ) ) ) ) { discard; } }
  9: void clip( vec4 v ) { if ( any( lessThan( v, vec4( 0.0 ) ) ) ) { discard; } }
 10: 
 11: float saturate( float v ) { return clamp( v, 0.0, 1.0 ); }
 12: vec2 saturate( vec2 v ) { return clamp( v, 0.0, 1.0 ); }
 13: vec3 saturate( vec3 v ) { return clamp( v, 0.0, 1.0 ); }
 14: vec4 saturate( vec4 v ) { return clamp( v, 0.0, 1.0 ); }
 15: 
 16: 
 17: uniform vec4 _fa_[30];
 18: 
 19: float dot3 (vec3 a , vec3 b ) {return dot ( a , b ) ; }
 20: float dot3 (vec3 a , vec4 b ) {return dot ( a , b. xyz ) ; }
 21: float dot3 (vec4 a , vec3 b ) {return dot ( a. xyz , b ) ; }
 22: float dot3 (vec4 a , vec4 b ) {return dot ( a. xyz , b. xyz ) ; }
 23: float dot4 (vec4 a , vec4 b ) {return dot ( a , b ) ; }
 24: float dot4 (vec2 a , vec4 b ) {return dot ( vec4 ( a , 0 , 1 ) , b ) ; }
 25: vec3 sRGBToLinearRGB (vec3 rgb ) {
 26:    return rgb ;
 27: }
 28: vec4 sRGBAToLinearRGBA (vec4 rgba ) {
 29:    return rgba ;
 30: }
 31: const vec4 matrixCoCg1YtoRGB1X = vec4( 1.0, -1.0, 0.0, 1.0 );
 32: const vec4 matrixCoCg1YtoRGB1Y = vec4( 0.0, 1.0, -0.50196078, 1.0 );
 33: const vec4 matrixCoCg1YtoRGB1Z = vec4( -1.0, -1.0, 1.00392156, 1.0 );
 34: vec3 ConvertYCoCgToRGB (vec4 YCoCg ) {
 35:    vec3 rgbColor ;
 36:    YCoCg. z = ( YCoCg. z * 31.875 ) + 1.0 ;
 37:    YCoCg. z = 1.0 / YCoCg. z ;
 38:    YCoCg. xy *= YCoCg. z ;
 39:    rgbColor. x = dot4 ( YCoCg , matrixCoCg1YtoRGB1X ) ;
 40:    rgbColor. y = dot4 ( YCoCg , matrixCoCg1YtoRGB1Y ) ;
 41:    rgbColor. z = dot4 ( YCoCg , matrixCoCg1YtoRGB1Z ) ;
 42:    return rgbColor ;
 43: }
 44: vec4 idtex2Dproj (sampler2D samp , vec4 texCoords ) {return textureProj ( samp , texCoords. xyw ) ; }
 45: uniform sampler2D samp0;
 46: uniform sampler2D samp1;
 47: uniform sampler2D samp2;
 48: uniform sampler2D samp3;
 49: uniform sampler2D samp4;
 50: uniform sampler2DArrayShadow samp5;
 51: uniform sampler2D samp6;
 52: 
 53: in vec4 vofi_TexCoord0;
 54: in vec4 vofi_TexCoord1;
 55: in vec4 vofi_TexCoord2;
 56: in vec4 vofi_TexCoord3;
 57: in vec4 vofi_TexCoord4;
 58: in vec4 vofi_TexCoord5;
 59: in vec4 vofi_TexCoord6;
 60: in vec4 vofi_TexCoord7;
 61: in vec4 vofi_TexCoord8;
 62: in vec4 vofi_TexCoord9;
 63: in vec4 vofi_Color;
 64: 
 65: out vec4 fo_FragColor;
 66: 
 67: void main() {
 68:    vec4 bumpMap = texture ( samp0 , vofi_TexCoord1 . xy ) ;
 69:    vec4 lightFalloff = ( idtex2Dproj ( samp3 , vofi_TexCoord2 ) ) ;
 70:    vec4 lightProj = ( idtex2Dproj ( samp4 , vofi_TexCoord3 ) ) ;
 71:    vec4 YCoCG = texture ( samp2 , vofi_TexCoord4 . xy ) ;
 72:    vec4 specMapSRGB = texture ( samp1 , vofi_TexCoord5 . xy ) ;
 73:    vec4 specMap = sRGBAToLinearRGBA ( specMapSRGB ) ;
 74:    vec3 lightVector = normalize ( vofi_TexCoord0 . xyz ) ;
 75:    vec3 viewVector = normalize ( vofi_TexCoord6 . xyz ) ;
 76:    vec3 diffuseMap = sRGBToLinearRGB ( ConvertYCoCgToRGB ( YCoCG ) ) ;
 77:    vec3 localNormal ;
 78:    localNormal. xy = bumpMap. wy - 0.5 ;
 79:    localNormal. z = sqrt ( abs ( dot ( localNormal. xy , localNormal. xy ) - 0.25 ) ) ;
 80:    localNormal = normalize ( localNormal ) ;
 81:    float ldotN = saturate ( dot3 ( localNormal , lightVector ) ) ;
 82:    float lambert = ldotN ;
 83:    int shadowIndex = 0 ;
 84:    vec3 toLightGlobal = normalize ( vofi_TexCoord8 . xyz ) ;
 85:    float axis [ 6 ] ;
 86:    axis [ 0 ] = - toLightGlobal. x ;
 87:    axis [ 1 ] = toLightGlobal. x ;
 88:    axis [ 2 ] = - toLightGlobal. y ;
 89:    axis [ 3 ] = toLightGlobal. y ;
 90:    axis [ 4 ] = - toLightGlobal. z ;
 91:    axis [ 5 ] = toLightGlobal. z ;
 92:    for ( int i = 0 ; i < 6 ; i ++ )
 93:    {
 94:        if ( axis [ i ] > axis [ shadowIndex ] )
 95:        {
 96:            shadowIndex = i ;
 97:        }
 98:    }
 99:    vec4 shadowMatrixX = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 0 ) ] ;
100:    vec4 shadowMatrixY = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 1 ) ] ;
101:    vec4 shadowMatrixZ = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 2 ) ] ;
102:    vec4 shadowMatrixW = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 3 ) ] ;
103:    vec4 modelPosition = vec4 ( vofi_TexCoord7 . xyz , 1.0 ) ;
104:    vec4 shadowTexcoord ;
105:    shadowTexcoord. x = dot4 ( modelPosition , shadowMatrixX ) ;
106:    shadowTexcoord. y = dot4 ( modelPosition , shadowMatrixY ) ;
107:    shadowTexcoord. z = dot4 ( modelPosition , shadowMatrixZ ) ;
108:    shadowTexcoord. w = dot4 ( modelPosition , shadowMatrixW ) ;
109:    float bias = 0.001 * tan ( acos ( ldotN ) ) ;
110:    bias = clamp ( bias , 0 , 0.01 ) ;
111:    shadowTexcoord. xyz /= shadowTexcoord. w ;
112:    shadowTexcoord. z = shadowTexcoord. z * _fa_[0 /* rpScreenCorrectionFactor */] . w ;
113:    shadowTexcoord. z = shadowTexcoord. z - bias ;
114:    shadowTexcoord. w = float ( shadowIndex ) ;
115:    vec2 poissonDisk [ 12 ] = vec2 [ ] (
116:    vec2 ( 0.6111618 , 0.1050905 ) ,
117:    vec2 ( 0.1088336 , 0.1127091 ) ,
118:    vec2 ( 0.3030421 , - 0.6292974 ) ,
119:    vec2 ( 0.4090526 , 0.6716492 ) ,
120:    vec2 ( - 0.1608387 , - 0.3867823 ) ,
121:    vec2 ( 0.7685862 , - 0.6118501 ) ,
122:    vec2 ( - 0.1935026 , - 0.856501 ) ,
123:    vec2 ( - 0.4028573 , 0.07754025 ) ,
124:    vec2 ( - 0.6411021 , - 0.4748057 ) ,
125:    vec2 ( - 0.1314865 , 0.8404058 ) ,
126:    vec2 ( - 0.7005203 , 0.4596822 ) ,
127:    vec2 ( - 0.9713828 , - 0.06329931 ) ) ;
128:    float shadow = 0.0 ;
129:    float numSamples = 12.0 ;
130:    float stepSize = 1.0 / numSamples ;
131:    vec4 jitterTC = ( gl_FragCoord * _fa_[0 /* rpScreenCorrectionFactor */] ) + _fa_[4 /* rpJitterTexOffset */] ;
132:    vec4 random = texture ( samp6 , jitterTC. xy ) * 3.14159265358979323846 ;
133:    vec2 rot ;
134:    rot. x = cos ( random. x ) ;
135:    rot. y = sin ( random. x ) ;
136:    float shadowTexelSize = _fa_[0 /* rpScreenCorrectionFactor */] . z * _fa_[3 /* rpJitterTexScale */] . x ;
137:    for ( int i = 0 ; i < 12 ; i ++ )
138:    {
139:        vec2 jitter = poissonDisk [ i ] ;
140:        vec2 jitterRotated ;
141:        jitterRotated. x = jitter. x * rot. x - jitter. y * rot. y ;
142:        jitterRotated. y = jitter. x * rot. y + jitter. y * rot. x ;
143:        vec4 shadowTexcoordJittered = vec4 ( shadowTexcoord. xy + jitterRotated * shadowTexelSize , shadowTexcoord. z , shadowTexcoord. w ) ;
144:        shadow += texture ( samp5 , shadowTexcoordJittered. xywz ) ;
145:    }
146:    shadow *= stepSize ;
147:    vec3 halfAngleVector = normalize ( lightVector + viewVector ) ;
148:    float hdotN = clamp ( dot3 ( halfAngleVector , localNormal ) , 0.0 , 1.0 ) ;
149:    float specularPower = 10.0 ;
150:    vec3 specularContribution = vec3 ( pow ( hdotN , specularPower ) ) ;
151:    vec3 diffuseColor = diffuseMap * sRGBToLinearRGB ( _fa_[1 /* rpDiffuseModifier */] . xyz ) ;
152:    vec3 specularColor = specMap. xyz * specularContribution * sRGBToLinearRGB ( _fa_[2 /* rpSpecularModifier */] . xyz ) ;
153:    vec3 lightColor = sRGBToLinearRGB ( lightProj. xyz * lightFalloff. xyz ) ;
154:    fo_FragColor . xyz = ( diffuseColor + specularColor ) * lambert * lightColor * vofi_Color . rgb * shadow ;
155:    fo_FragColor . w = 1.0 ;
156: }
-----------------
0(110) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
    (0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
    (0) : float clamp(float, float, float)

While compiling fragment program renderprogs/interactionSM.ps.hlsl
-----------------
  1: // filename renderprogs/interactionSM.ps.hlsl
  2: #version 460
  3: #pragma shader_stage( fragment )
  4: #extension GL_ARB_separate_shader_objects : enable
  5: 
  6: void clip( float v ) { if ( v < 0.0 ) { discard; } }
  7: void clip( vec2 v ) { if ( any( lessThan( v, vec2( 0.0 ) ) ) ) { discard; } }
  8: void clip( vec3 v ) { if ( any( lessThan( v, vec3( 0.0 ) ) ) ) { discard; } }
  9: void clip( vec4 v ) { if ( any( lessThan( v, vec4( 0.0 ) ) ) ) { discard; } }
 10: 
 11: float saturate( float v ) { return clamp( v, 0.0, 1.0 ); }
 12: vec2 saturate( vec2 v ) { return clamp( v, 0.0, 1.0 ); }
 13: vec3 saturate( vec3 v ) { return clamp( v, 0.0, 1.0 ); }
 14: vec4 saturate( vec4 v ) { return clamp( v, 0.0, 1.0 ); }
 15: 
 16: 
 17: uniform vec4 _fa_[30];
 18: 
 19: float dot3 (vec3 a , vec3 b ) {return dot ( a , b ) ; }
 20: float dot3 (vec3 a , vec4 b ) {return dot ( a , b. xyz ) ; }
 21: float dot3 (vec4 a , vec3 b ) {return dot ( a. xyz , b ) ; }
 22: float dot3 (vec4 a , vec4 b ) {return dot ( a. xyz , b. xyz ) ; }
 23: float dot4 (vec4 a , vec4 b ) {return dot ( a , b ) ; }
 24: float dot4 (vec2 a , vec4 b ) {return dot ( vec4 ( a , 0 , 1 ) , b ) ; }
 25: vec3 sRGBToLinearRGB (vec3 rgb ) {
 26:    return rgb ;
 27: }
 28: vec4 sRGBAToLinearRGBA (vec4 rgba ) {
 29:    return rgba ;
 30: }
 31: const vec4 matrixCoCg1YtoRGB1X = vec4( 1.0, -1.0, 0.0, 1.0 );
 32: const vec4 matrixCoCg1YtoRGB1Y = vec4( 0.0, 1.0, -0.50196078, 1.0 );
 33: const vec4 matrixCoCg1YtoRGB1Z = vec4( -1.0, -1.0, 1.00392156, 1.0 );
 34: vec3 ConvertYCoCgToRGB (vec4 YCoCg ) {
 35:    vec3 rgbColor ;
 36:    YCoCg. z = ( YCoCg. z * 31.875 ) + 1.0 ;
 37:    YCoCg. z = 1.0 / YCoCg. z ;
 38:    YCoCg. xy *= YCoCg. z ;
 39:    rgbColor. x = dot4 ( YCoCg , matrixCoCg1YtoRGB1X ) ;
 40:    rgbColor. y = dot4 ( YCoCg , matrixCoCg1YtoRGB1Y ) ;
 41:    rgbColor. z = dot4 ( YCoCg , matrixCoCg1YtoRGB1Z ) ;
 42:    return rgbColor ;
 43: }
 44: vec4 idtex2Dproj (sampler2D samp , vec4 texCoords ) {return textureProj ( samp , texCoords. xyw ) ; }
 45: uniform sampler2D samp0;
 46: uniform sampler2D samp1;
 47: uniform sampler2D samp2;
 48: uniform sampler2D samp3;
 49: uniform sampler2D samp4;
 50: uniform sampler2DArrayShadow samp5;
 51: uniform sampler2D samp6;
 52: 
 53: in vec4 vofi_TexCoord0;
 54: in vec4 vofi_TexCoord1;
 55: in vec4 vofi_TexCoord2;
 56: in vec4 vofi_TexCoord3;
 57: in vec4 vofi_TexCoord4;
 58: in vec4 vofi_TexCoord5;
 59: in vec4 vofi_TexCoord6;
 60: in vec4 vofi_TexCoord7;
 61: in vec4 vofi_TexCoord8;
 62: in vec4 vofi_TexCoord9;
 63: in vec4 vofi_Color;
 64: 
 65: out vec4 fo_FragColor;
 66: 
 67: void main() {
 68:    vec4 bumpMap = texture ( samp0 , vofi_TexCoord1 . xy ) ;
 69:    vec4 lightFalloff = ( idtex2Dproj ( samp3 , vofi_TexCoord2 ) ) ;
 70:    vec4 lightProj = ( idtex2Dproj ( samp4 , vofi_TexCoord3 ) ) ;
 71:    vec4 YCoCG = texture ( samp2 , vofi_TexCoord4 . xy ) ;
 72:    vec4 specMapSRGB = texture ( samp1 , vofi_TexCoord5 . xy ) ;
 73:    vec4 specMap = sRGBAToLinearRGBA ( specMapSRGB ) ;
 74:    vec3 lightVector = normalize ( vofi_TexCoord0 . xyz ) ;
 75:    vec3 viewVector = normalize ( vofi_TexCoord6 . xyz ) ;
 76:    vec3 diffuseMap = sRGBToLinearRGB ( ConvertYCoCgToRGB ( YCoCG ) ) ;
 77:    vec3 localNormal ;
 78:    localNormal. xy = bumpMap. wy - 0.5 ;
 79:    localNormal. z = sqrt ( abs ( dot ( localNormal. xy , localNormal. xy ) - 0.25 ) ) ;
 80:    localNormal = normalize ( localNormal ) ;
 81:    float ldotN = saturate ( dot3 ( localNormal , lightVector ) ) ;
 82:    float lambert = ldotN ;
 83:    int shadowIndex = 0 ;
 84:    vec3 toLightGlobal = normalize ( vofi_TexCoord8 . xyz ) ;
 85:    float axis [ 6 ] ;
 86:    axis [ 0 ] = - toLightGlobal. x ;
 87:    axis [ 1 ] = toLightGlobal. x ;
 88:    axis [ 2 ] = - toLightGlobal. y ;
 89:    axis [ 3 ] = toLightGlobal. y ;
 90:    axis [ 4 ] = - toLightGlobal. z ;
 91:    axis [ 5 ] = toLightGlobal. z ;
 92:    for ( int i = 0 ; i < 6 ; i ++ )
 93:    {
 94:        if ( axis [ i ] > axis [ shadowIndex ] )
 95:        {
 96:            shadowIndex = i ;
 97:        }
 98:    }
 99:    vec4 shadowMatrixX = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 0 ) ] ;
100:    vec4 shadowMatrixY = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 1 ) ] ;
101:    vec4 shadowMatrixZ = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 2 ) ] ;
102:    vec4 shadowMatrixW = _fa_[/* rpShadowMatrices */ 5 + int ( shadowIndex * 4 + 3 ) ] ;
103:    vec4 modelPosition = vec4 ( vofi_TexCoord7 . xyz , 1.0 ) ;
104:    vec4 shadowTexcoord ;
105:    shadowTexcoord. x = dot4 ( modelPosition , shadowMatrixX ) ;
106:    shadowTexcoord. y = dot4 ( modelPosition , shadowMatrixY ) ;
107:    shadowTexcoord. z = dot4 ( modelPosition , shadowMatrixZ ) ;
108:    shadowTexcoord. w = dot4 ( modelPosition , shadowMatrixW ) ;
109:    float bias = 0.001 * tan ( acos ( ldotN ) ) ;
110:    bias = clamp ( bias , 0 , 0.01 ) ;
111:    shadowTexcoord. xyz /= shadowTexcoord. w ;
112:    shadowTexcoord. z = shadowTexcoord. z * _fa_[0 /* rpScreenCorrectionFactor */] . w ;
113:    shadowTexcoord. z = shadowTexcoord. z - bias ;
114:    shadowTexcoord. w = float ( shadowIndex ) ;
115:    vec2 poissonDisk [ 12 ] = vec2 [ ] (
116:    vec2 ( 0.6111618 , 0.1050905 ) ,
117:    vec2 ( 0.1088336 , 0.1127091 ) ,
118:    vec2 ( 0.3030421 , - 0.6292974 ) ,
119:    vec2 ( 0.4090526 , 0.6716492 ) ,
120:    vec2 ( - 0.1608387 , - 0.3867823 ) ,
121:    vec2 ( 0.7685862 , - 0.6118501 ) ,
122:    vec2 ( - 0.1935026 , - 0.856501 ) ,
123:    vec2 ( - 0.4028573 , 0.07754025 ) ,
124:    vec2 ( - 0.6411021 , - 0.4748057 ) ,
125:    vec2 ( - 0.1314865 , 0.8404058 ) ,
126:    vec2 ( - 0.7005203 , 0.4596822 ) ,
127:    vec2 ( - 0.9713828 , - 0.06329931 ) ) ;
128:    float shadow = 0.0 ;
129:    float numSamples = 12.0 ;
130:    float stepSize = 1.0 / numSamples ;
131:    vec4 jitterTC = ( gl_FragCoord * _fa_[0 /* rpScreenCorrectionFactor */] ) + _fa_[4 /* rpJitterTexOffset */] ;
132:    vec4 random = texture ( samp6 , jitterTC. xy ) * 3.14159265358979323846 ;
133:    vec2 rot ;
134:    rot. x = cos ( random. x ) ;
135:    rot. y = sin ( random. x ) ;
136:    float shadowTexelSize = _fa_[0 /* rpScreenCorrectionFactor */] . z * _fa_[3 /* rpJitterTexScale */] . x ;
137:    for ( int i = 0 ; i < 12 ; i ++ )
138:    {
139:        vec2 jitter = poissonDisk [ i ] ;
140:        vec2 jitterRotated ;
141:        jitterRotated. x = jitter. x * rot. x - jitter. y * rot. y ;
142:        jitterRotated. y = jitter. x * rot. y + jitter. y * rot. x ;
143:        vec4 shadowTexcoordJittered = vec4 ( shadowTexcoord. xy + jitterRotated * shadowTexelSize , shadowTexcoord. z , shadowTexcoord. w ) ;
144:        shadow += texture ( samp5 , shadowTexcoordJittered. xywz ) ;
145:    }
146:    shadow *= stepSize ;
147:    vec3 halfAngleVector = normalize ( lightVector + viewVector ) ;
148:    float hdotN = clamp ( dot3 ( halfAngleVector , localNormal ) , 0.0 , 1.0 ) ;
149:    float specularPower = 10.0 ;
150:    vec3 specularContribution = vec3 ( pow ( hdotN , specularPower ) ) ;
151:    vec3 diffuseColor = diffuseMap * sRGBToLinearRGB ( _fa_[1 /* rpDiffuseModifier */] . xyz ) ;
152:    vec3 specularColor = specMap. xyz * specularContribution * sRGBToLinearRGB ( _fa_[2 /* rpSpecularModifier */] . xyz ) ;
153:    vec3 lightColor = sRGBToLinearRGB ( lightProj. xyz * lightFalloff. xyz ) ;
154:    fo_FragColor . xyz = ( diffuseColor + specularColor ) * lambert * lightColor * vofi_Color . rgb * shadow ;
155:    fo_FragColor . w = 1.0 ;
156: }
-----------------
0(110) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
    (0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
    (0) : float clamp(float, float, float)

While compiling fragment program renderprogs/interactionSM.ps.hlsl
-----------------
  1: // filename renderprogs/interactionSM.ps.hlsl
  2: #version 460
  3: #pragma shader_stage( fragment )
  4: #extension GL_ARB_separate_shader_objects : enable
  5: 
  6: void clip( float v ) { if ( v < 0.0 ) { discard; } }
  7: void clip( vec2 v ) { if ( any( lessThan( v, vec2( 0.0 ) ) ) ) { discard; } }
  8: void clip( vec3 v ) { if ( any( lessThan( v, vec3( 0.0 ) ) ) ) { discard; } }
  9: void clip( vec4 v ) { if ( any( lessThan( v, vec4( 0.0 ) ) ) ) { discard; } }
 10: 
 11: float saturate( float v ) { return clamp( v, 0.0, 1.0 ); }
 12: vec2 saturate( vec2 v ) { return clamp( v, 0.0, 1.0 ); }
 13: vec3 saturate( vec3 v ) { return clamp( v, 0.0, 1.0 ); }
 14: vec4 saturate( vec4 v ) { return clamp( v, 0.0, 1.0 ); }
 15: 
 16: 
 17: uniform vec4 _fa_[31];
 18: 
 19: float dot3 (vec3 a , vec3 b ) {return dot ( a , b ) ; }
 20: float dot3 (vec3 a , vec4 b ) {return dot ( a , b. xyz ) ; }
 21: float dot3 (vec4 a , vec3 b ) {return dot ( a. xyz , b ) ; }
 22: float dot3 (vec4 a , vec4 b ) {return dot ( a. xyz , b. xyz ) ; }
 23: float dot4 (vec4 a , vec4 b ) {return dot ( a , b ) ; }
 24: float dot4 (vec2 a , vec4 b ) {return dot ( vec4 ( a , 0 , 1 ) , b ) ; }
 25: vec3 sRGBToLinearRGB (vec3 rgb ) {
 26:    return rgb ;
 27: }
 28: vec4 sRGBAToLinearRGBA (vec4 rgba ) {
 29:    return rgba ;
 30: }
 31: const vec4 matrixCoCg1YtoRGB1X = vec4( 1.0, -1.0, 0.0, 1.0 );
 32: const vec4 matrixCoCg1YtoRGB1Y = vec4( 0.0, 1.0, -0.50196078, 1.0 );
 33: const vec4 matrixCoCg1YtoRGB1Z = vec4( -1.0, -1.0, 1.00392156, 1.0 );
 34: vec3 ConvertYCoCgToRGB (vec4 YCoCg ) {
 35:    vec3 rgbColor ;
 36:    YCoCg. z = ( YCoCg. z * 31.875 ) + 1.0 ;
 37:    YCoCg. z = 1.0 / YCoCg. z ;
 38:    YCoCg. xy *= YCoCg. z ;
 39:    rgbColor. x = dot4 ( YCoCg , matrixCoCg1YtoRGB1X ) ;
 40:    rgbColor. y = dot4 ( YCoCg , matrixCoCg1YtoRGB1Y ) ;
 41:    rgbColor. z = dot4 ( YCoCg , matrixCoCg1YtoRGB1Z ) ;
 42:    return rgbColor ;
 43: }
 44: vec4 idtex2Dproj (sampler2D samp , vec4 texCoords ) {return textureProj ( samp , texCoords. xyw ) ; }
 45: uniform sampler2D samp0;
 46: uniform sampler2D samp1;
 47: uniform sampler2D samp2;
 48: uniform sampler2D samp3;
 49: uniform sampler2D samp4;
 50: uniform sampler2DArrayShadow samp5;
 51: uniform sampler2D samp6;
 52: 
 53: in vec4 vofi_TexCoord0;
 54: in vec4 vofi_TexCoord1;
 55: in vec4 vofi_TexCoord2;
 56: in vec4 vofi_TexCoord3;
 57: in vec4 vofi_TexCoord4;
 58: in vec4 vofi_TexCoord5;
 59: in vec4 vofi_TexCoord6;
 60: in vec4 vofi_TexCoord7;
 61: in vec4 vofi_TexCoord8;
 62: in vec4 vofi_TexCoord9;
 63: in vec4 vofi_Color;
 64: 
 65: out vec4 fo_FragColor;
 66: 
 67: void main() {
 68:    vec4 bumpMap = texture ( samp0 , vofi_TexCoord1 . xy ) ;
 69:    vec4 lightFalloff = ( idtex2Dproj ( samp3 , vofi_TexCoord2 ) ) ;
 70:    vec4 lightProj = ( idtex2Dproj ( samp4 , vofi_TexCoord3 ) ) ;
 71:    vec4 YCoCG = texture ( samp2 , vofi_TexCoord4 . xy ) ;
 72:    vec4 specMapSRGB = texture ( samp1 , vofi_TexCoord5 . xy ) ;
 73:    vec4 specMap = sRGBAToLinearRGBA ( specMapSRGB ) ;
 74:    vec3 lightVector = normalize ( vofi_TexCoord0 . xyz ) ;
 75:    vec3 viewVector = normalize ( vofi_TexCoord6 . xyz ) ;
 76:    vec3 diffuseMap = sRGBToLinearRGB ( ConvertYCoCgToRGB ( YCoCG ) ) ;
 77:    vec3 localNormal ;
 78:    localNormal. xy = bumpMap. wy - 0.5 ;
 79:    localNormal. z = sqrt ( abs ( dot ( localNormal. xy , localNormal. xy ) - 0.25 ) ) ;
 80:    localNormal = normalize ( localNormal ) ;
 81:    float ldotN = saturate ( dot3 ( localNormal , lightVector ) ) ;
 82:    float lambert = ldotN ;
 83:    int shadowIndex = 0 ;
 84:    float viewZ = - vofi_TexCoord9 . z ;
 85:    shadowIndex = 4 ;
 86:    for ( int i = 0 ; i < 4 ; i ++ )
 87:    {
 88:        if ( viewZ < _fa_[5 /* rpCascadeDistances */] [ i ] )
 89:        {
 90:            shadowIndex = i ;
 91:            break ;
 92:        }
 93:    }
 94:    vec4 shadowMatrixX = _fa_[/* rpShadowMatrices */ 6 + int ( shadowIndex * 4 + 0 ) ] ;
 95:    vec4 shadowMatrixY = _fa_[/* rpShadowMatrices */ 6 + int ( shadowIndex * 4 + 1 ) ] ;
 96:    vec4 shadowMatrixZ = _fa_[/* rpShadowMatrices */ 6 + int ( shadowIndex * 4 + 2 ) ] ;
 97:    vec4 shadowMatrixW = _fa_[/* rpShadowMatrices */ 6 + int ( shadowIndex * 4 + 3 ) ] ;
 98:    vec4 modelPosition = vec4 ( vofi_TexCoord7 . xyz , 1.0 ) ;
 99:    vec4 shadowTexcoord ;
100:    shadowTexcoord. x = dot4 ( modelPosition , shadowMatrixX ) ;
101:    shadowTexcoord. y = dot4 ( modelPosition , shadowMatrixY ) ;
102:    shadowTexcoord. z = dot4 ( modelPosition , shadowMatrixZ ) ;
103:    shadowTexcoord. w = dot4 ( modelPosition , shadowMatrixW ) ;
104:    float bias = 0.001 * tan ( acos ( ldotN ) ) ;
105:    bias = clamp ( bias , 0 , 0.01 ) ;
106:    shadowTexcoord. xyz /= shadowTexcoord. w ;
107:    shadowTexcoord. z = shadowTexcoord. z * _fa_[0 /* rpScreenCorrectionFactor */] . w ;
108:    shadowTexcoord. z = shadowTexcoord. z - bias ;
109:    shadowTexcoord. w = float ( shadowIndex ) ;
110:    vec2 poissonDisk [ 12 ] = vec2 [ ] (
111:    vec2 ( 0.6111618 , 0.1050905 ) ,
112:    vec2 ( 0.1088336 , 0.1127091 ) ,
113:    vec2 ( 0.3030421 , - 0.6292974 ) ,
114:    vec2 ( 0.4090526 , 0.6716492 ) ,
115:    vec2 ( - 0.1608387 , - 0.3867823 ) ,
116:    vec2 ( 0.7685862 , - 0.6118501 ) ,
117:    vec2 ( - 0.1935026 , - 0.856501 ) ,
118:    vec2 ( - 0.4028573 , 0.07754025 ) ,
119:    vec2 ( - 0.6411021 , - 0.4748057 ) ,
120:    vec2 ( - 0.1314865 , 0.8404058 ) ,
121:    vec2 ( - 0.7005203 , 0.4596822 ) ,
122:    vec2 ( - 0.9713828 , - 0.06329931 ) ) ;
123:    float shadow = 0.0 ;
124:    float numSamples = 12.0 ;
125:    float stepSize = 1.0 / numSamples ;
126:    vec4 jitterTC = ( gl_FragCoord * _fa_[0 /* rpScreenCorrectionFactor */] ) + _fa_[4 /* rpJitterTexOffset */] ;
127:    vec4 random = texture ( samp6 , jitterTC. xy ) * 3.14159265358979323846 ;
128:    vec2 rot ;
129:    rot. x = cos ( random. x ) ;
130:    rot. y = sin ( random. x ) ;
131:    float shadowTexelSize = _fa_[0 /* rpScreenCorrectionFactor */] . z * _fa_[3 /* rpJitterTexScale */] . x ;
132:    for ( int i = 0 ; i < 12 ; i ++ )
133:    {
134:        vec2 jitter = poissonDisk [ i ] ;
135:        vec2 jitterRotated ;
136:        jitterRotated. x = jitter. x * rot. x - jitter. y * rot. y ;
137:        jitterRotated. y = jitter. x * rot. y + jitter. y * rot. x ;
138:        vec4 shadowTexcoordJittered = vec4 ( shadowTexcoord. xy + jitterRotated * shadowTexelSize , shadowTexcoord. z , shadowTexcoord. w ) ;
139:        shadow += texture ( samp5 , shadowTexcoordJittered. xywz ) ;
140:    }
141:    shadow *= stepSize ;
142:    vec3 halfAngleVector = normalize ( lightVector + viewVector ) ;
143:    float hdotN = clamp ( dot3 ( halfAngleVector , localNormal ) , 0.0 , 1.0 ) ;
144:    float specularPower = 10.0 ;
145:    vec3 specularContribution = vec3 ( pow ( hdotN , specularPower ) ) ;
146:    vec3 diffuseColor = diffuseMap * sRGBToLinearRGB ( _fa_[1 /* rpDiffuseModifier */] . xyz ) ;
147:    vec3 specularColor = specMap. xyz * specularContribution * sRGBToLinearRGB ( _fa_[2 /* rpSpecularModifier */] . xyz ) ;
148:    vec3 lightColor = sRGBToLinearRGB ( lightProj. xyz * lightFalloff. xyz ) ;
149:    fo_FragColor . xyz = ( diffuseColor + specularColor ) * lambert * lightColor * vofi_Color . rgb * shadow ;
150:    fo_FragColor . w = 1.0 ;
151: }
-----------------
0(105) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
    (0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
    (0) : float clamp(float, float, float)

While compiling fragment program renderprogs/interactionSM.ps.hlsl
-----------------
  1: // filename renderprogs/interactionSM.ps.hlsl
  2: #version 460
  3: #pragma shader_stage( fragment )
  4: #extension GL_ARB_separate_shader_objects : enable
  5: 
  6: void clip( float v ) { if ( v < 0.0 ) { discard; } }
  7: void clip( vec2 v ) { if ( any( lessThan( v, vec2( 0.0 ) ) ) ) { discard; } }
  8: void clip( vec3 v ) { if ( any( lessThan( v, vec3( 0.0 ) ) ) ) { discard; } }
  9: void clip( vec4 v ) { if ( any( lessThan( v, vec4( 0.0 ) ) ) ) { discard; } }
 10: 
 11: float saturate( float v ) { return clamp( v, 0.0, 1.0 ); }
 12: vec2 saturate( vec2 v ) { return clamp( v, 0.0, 1.0 ); }
 13: vec3 saturate( vec3 v ) { return clamp( v, 0.0, 1.0 ); }
 14: vec4 saturate( vec4 v ) { return clamp( v, 0.0, 1.0 ); }
 15: 
 16: 
 17: uniform vec4 _fa_[31];
 18: 
 19: float dot3 (vec3 a , vec3 b ) {return dot ( a , b ) ; }
 20: float dot3 (vec3 a , vec4 b ) {return dot ( a , b. xyz ) ; }
 21: float dot3 (vec4 a , vec3 b ) {return dot ( a. xyz , b ) ; }
 22: float dot3 (vec4 a , vec4 b ) {return dot ( a. xyz , b. xyz ) ; }
 23: float dot4 (vec4 a , vec4 b ) {return dot ( a , b ) ; }
 24: float dot4 (vec2 a , vec4 b ) {return dot ( vec4 ( a , 0 , 1 ) , b ) ; }
 25: vec3 sRGBToLinearRGB (vec3 rgb ) {
 26:    return rgb ;
 27: }
 28: vec4 sRGBAToLinearRGBA (vec4 rgba ) {
 29:    return rgba ;
 30: }
 31: const vec4 matrixCoCg1YtoRGB1X = vec4( 1.0, -1.0, 0.0, 1.0 );
 32: const vec4 matrixCoCg1YtoRGB1Y = vec4( 0.0, 1.0, -0.50196078, 1.0 );
 33: const vec4 matrixCoCg1YtoRGB1Z = vec4( -1.0, -1.0, 1.00392156, 1.0 );
 34: vec3 ConvertYCoCgToRGB (vec4 YCoCg ) {
 35:    vec3 rgbColor ;
 36:    YCoCg. z = ( YCoCg. z * 31.875 ) + 1.0 ;
 37:    YCoCg. z = 1.0 / YCoCg. z ;
 38:    YCoCg. xy *= YCoCg. z ;
 39:    rgbColor. x = dot4 ( YCoCg , matrixCoCg1YtoRGB1X ) ;
 40:    rgbColor. y = dot4 ( YCoCg , matrixCoCg1YtoRGB1Y ) ;
 41:    rgbColor. z = dot4 ( YCoCg , matrixCoCg1YtoRGB1Z ) ;
 42:    return rgbColor ;
 43: }
 44: vec4 idtex2Dproj (sampler2D samp , vec4 texCoords ) {return textureProj ( samp , texCoords. xyw ) ; }
 45: uniform sampler2D samp0;
 46: uniform sampler2D samp1;
 47: uniform sampler2D samp2;
 48: uniform sampler2D samp3;
 49: uniform sampler2D samp4;
 50: uniform sampler2DArrayShadow samp5;
 51: uniform sampler2D samp6;
 52: 
 53: in vec4 vofi_TexCoord0;
 54: in vec4 vofi_TexCoord1;
 55: in vec4 vofi_TexCoord2;
 56: in vec4 vofi_TexCoord3;
 57: in vec4 vofi_TexCoord4;
 58: in vec4 vofi_TexCoord5;
 59: in vec4 vofi_TexCoord6;
 60: in vec4 vofi_TexCoord7;
 61: in vec4 vofi_TexCoord8;
 62: in vec4 vofi_TexCoord9;
 63: in vec4 vofi_Color;
 64: 
 65: out vec4 fo_FragColor;
 66: 
 67: void main() {
 68:    vec4 bumpMap = texture ( samp0 , vofi_TexCoord1 . xy ) ;
 69:    vec4 lightFalloff = ( idtex2Dproj ( samp3 , vofi_TexCoord2 ) ) ;
 70:    vec4 lightProj = ( idtex2Dproj ( samp4 , vofi_TexCoord3 ) ) ;
 71:    vec4 YCoCG = texture ( samp2 , vofi_TexCoord4 . xy ) ;
 72:    vec4 specMapSRGB = texture ( samp1 , vofi_TexCoord5 . xy ) ;
 73:    vec4 specMap = sRGBAToLinearRGBA ( specMapSRGB ) ;
 74:    vec3 lightVector = normalize ( vofi_TexCoord0 . xyz ) ;
 75:    vec3 viewVector = normalize ( vofi_TexCoord6 . xyz ) ;
 76:    vec3 diffuseMap = sRGBToLinearRGB ( ConvertYCoCgToRGB ( YCoCG ) ) ;
 77:    vec3 localNormal ;
 78:    localNormal. xy = bumpMap. wy - 0.5 ;
 79:    localNormal. z = sqrt ( abs ( dot ( localNormal. xy , localNormal. xy ) - 0.25 ) ) ;
 80:    localNormal = normalize ( localNormal ) ;
 81:    float ldotN = saturate ( dot3 ( localNormal , lightVector ) ) ;
 82:    float lambert = ldotN ;
 83:    int shadowIndex = 0 ;
 84:    float viewZ = - vofi_TexCoord9 . z ;
 85:    shadowIndex = 4 ;
 86:    for ( int i = 0 ; i < 4 ; i ++ )
 87:    {
 88:        if ( viewZ < _fa_[5 /* rpCascadeDistances */] [ i ] )
 89:        {
 90:            shadowIndex = i ;
 91:            break ;
 92:        }
 93:    }
 94:    vec4 shadowMatrixX = _fa_[/* rpShadowMatrices */ 6 + int ( shadowIndex * 4 + 0 ) ] ;
 95:    vec4 shadowMatrixY = _fa_[/* rpShadowMatrices */ 6 + int ( shadowIndex * 4 + 1 ) ] ;
 96:    vec4 shadowMatrixZ = _fa_[/* rpShadowMatrices */ 6 + int ( shadowIndex * 4 + 2 ) ] ;
 97:    vec4 shadowMatrixW = _fa_[/* rpShadowMatrices */ 6 + int ( shadowIndex * 4 + 3 ) ] ;
 98:    vec4 modelPosition = vec4 ( vofi_TexCoord7 . xyz , 1.0 ) ;
 99:    vec4 shadowTexcoord ;
100:    shadowTexcoord. x = dot4 ( modelPosition , shadowMatrixX ) ;
101:    shadowTexcoord. y = dot4 ( modelPosition , shadowMatrixY ) ;
102:    shadowTexcoord. z = dot4 ( modelPosition , shadowMatrixZ ) ;
103:    shadowTexcoord. w = dot4 ( modelPosition , shadowMatrixW ) ;
104:    float bias = 0.001 * tan ( acos ( ldotN ) ) ;
105:    bias = clamp ( bias , 0 , 0.01 ) ;
106:    shadowTexcoord. xyz /= shadowTexcoord. w ;
107:    shadowTexcoord. z = shadowTexcoord. z * _fa_[0 /* rpScreenCorrectionFactor */] . w ;
108:    shadowTexcoord. z = shadowTexcoord. z - bias ;
109:    shadowTexcoord. w = float ( shadowIndex ) ;
110:    vec2 poissonDisk [ 12 ] = vec2 [ ] (
111:    vec2 ( 0.6111618 , 0.1050905 ) ,
112:    vec2 ( 0.1088336 , 0.1127091 ) ,
113:    vec2 ( 0.3030421 , - 0.6292974 ) ,
114:    vec2 ( 0.4090526 , 0.6716492 ) ,
115:    vec2 ( - 0.1608387 , - 0.3867823 ) ,
116:    vec2 ( 0.7685862 , - 0.6118501 ) ,
117:    vec2 ( - 0.1935026 , - 0.856501 ) ,
118:    vec2 ( - 0.4028573 , 0.07754025 ) ,
119:    vec2 ( - 0.6411021 , - 0.4748057 ) ,
120:    vec2 ( - 0.1314865 , 0.8404058 ) ,
121:    vec2 ( - 0.7005203 , 0.4596822 ) ,
122:    vec2 ( - 0.9713828 , - 0.06329931 ) ) ;
123:    float shadow = 0.0 ;
124:    float numSamples = 12.0 ;
125:    float stepSize = 1.0 / numSamples ;
126:    vec4 jitterTC = ( gl_FragCoord * _fa_[0 /* rpScreenCorrectionFactor */] ) + _fa_[4 /* rpJitterTexOffset */] ;
127:    vec4 random = texture ( samp6 , jitterTC. xy ) * 3.14159265358979323846 ;
128:    vec2 rot ;
129:    rot. x = cos ( random. x ) ;
130:    rot. y = sin ( random. x ) ;
131:    float shadowTexelSize = _fa_[0 /* rpScreenCorrectionFactor */] . z * _fa_[3 /* rpJitterTexScale */] . x ;
132:    for ( int i = 0 ; i < 12 ; i ++ )
133:    {
134:        vec2 jitter = poissonDisk [ i ] ;
135:        vec2 jitterRotated ;
136:        jitterRotated. x = jitter. x * rot. x - jitter. y * rot. y ;
137:        jitterRotated. y = jitter. x * rot. y + jitter. y * rot. x ;
138:        vec4 shadowTexcoordJittered = vec4 ( shadowTexcoord. xy + jitterRotated * shadowTexelSize , shadowTexcoord. z , shadowTexcoord. w ) ;
139:        shadow += texture ( samp5 , shadowTexcoordJittered. xywz ) ;
140:    }
141:    shadow *= stepSize ;
142:    vec3 halfAngleVector = normalize ( lightVector + viewVector ) ;
143:    float hdotN = clamp ( dot3 ( halfAngleVector , localNormal ) , 0.0 , 1.0 ) ;
144:    float specularPower = 10.0 ;
145:    vec3 specularContribution = vec3 ( pow ( hdotN , specularPower ) ) ;
146:    vec3 diffuseColor = diffuseMap * sRGBToLinearRGB ( _fa_[1 /* rpDiffuseModifier */] . xyz ) ;
147:    vec3 specularColor = specMap. xyz * specularContribution * sRGBToLinearRGB ( _fa_[2 /* rpSpecularModifier */] . xyz ) ;
148:    vec3 lightColor = sRGBToLinearRGB ( lightProj. xyz * lightFalloff. xyz ) ;
149:    fo_FragColor . xyz = ( diffuseColor + specularColor ) * lambert * lightColor * vofi_Color . rgb * shadow ;
150:    fo_FragColor . w = 1.0 ;
151: }
-----------------
0(105) : error C1101: ambiguous overloaded function reference "clamp(float, int, float)"
    (0) : gp5 float64_t clamp(float64_t, float64_t, float64_t)
    (0) : float clamp(float, float, float)

----- Initializing Sound System ------
Setup OpenAL device and context... idSoundHardware_OpenAL::Init: Number of EAX sends: 4
Done.
OpenAL vendor: OpenAL Community
OpenAL renderer: OpenAL Soft
OpenAL version: 1.1 ALSOFT 1.23.1
OpenAL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STATIC_BUFFER AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFT_buffer_length_query AL_SOFT_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFT_gain_clamp_ex AL_SOFTX_hold_on_disconnect AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize AL_SOFT_source_start_delay AL_SOFT_UHJ AL_SOFT_UHJ_ex
Devices list:
-------------
*     1: ALSA Default
      2: HDA Intel PCH, ALCS1200A Analog (CARD=PCH,DEV=0)
      3: HDA Intel PCH, ALCS1200A Digital (CARD=PCH,DEV=1)
      4: HDA NVidia, G24F 2 (CARD=NVidia,DEV=3)
      5: HDA NVidia, VE247 (CARD=NVidia,DEV=7)
      6: HDA NVidia, HDMI 2 (CARD=NVidia,DEV=8)
      7: HDA NVidia, HDMI 3 (CARD=NVidia,DEV=9)
      8: Razer Kraken Kitty Edition, USB Audio (CARD=Edition,DEV=0)
-------------
sound system initialized.
--------------------------------------
Creating Default Device Detection Thread
------- Initializing renderSystem --------
Binarize File: '_default' - reason 'generated image'
Binarize File: '_white' - reason 'generated image'
Binarize File: '_black' - reason 'generated image'
Binarize File: '_flat' - reason 'generated image'
Binarize File: '_alphaNotch' - reason 'generated image'
Binarize File: '_fog' - reason 'generated image'
Binarize File: '_fogEnter' - reason 'generated image'
Binarize File: '_noFalloff' - reason 'generated image'
Binarize File: '_quadratic' - reason 'generated image'
Binarize File: '_jitter1' - reason 'generated image'
Binarize File: '_jitter4' - reason 'generated image'
Binarize File: '_jitter16' - reason 'generated image'
Binarize File: '_random256' - reason 'generated image'
Binarize File: '_heatmap5' - reason 'generated image'
Binarize File: '_heatmap7' - reason 'generated image'
Binarize File: '_grain1' - reason 'generated image'
Binarize File: '_smaaInput' - reason 'generated image'
Binarize File: '_smaaArea' - reason 'generated image'
Binarize File: '_smaaSearch' - reason 'generated image'
Binarize File: '_scratch' - reason 'generated image'
Binarize File: '_scratch2' - reason 'generated image'
Binarize File: '_accum' - reason 'generated image'
Binarize File: '_currentRender' - reason 'generated image'
Updating texture filter parameters.
renderSystem initialized.
--------------------------------------
Initializing Platform
Failed to initialize
WARNING: Couldn't load image: guis/assets/splash/legal_photosensitivity : guis/assets/splash/legal_photosensitivity#__0200
WARNING: Couldn't load image: guis/assets/splash/legal_photosensitivity : guis/assets/splash/legal_photosensitivity#__0200
WARNING: Couldn't load image: splashbink : splashbink#__0200
Video audio stream found:
    Sample Rate: 44100Hz
    Sample Format: Mono Float Point
Loaded FFMPEG file: 'video\loadvideo.bik', looping=01280x360, 30.000000 FPS, 10.000000 sec
Binarize File: '_cinematic' - reason 'generated image'
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
OpenAL Error: Invalid Value (0xa003), @ /home/runner/work/Classic-RBDOOM-3-BFG/Classic-RBDOOM-3-BFG/neo/sound/OpenAL/AL_CinematicAudio.cpp 167
Reading strings/english.lang as UTF-8
9104 strings read
Reading strings/english_bfa.lang as UTF-8
57 strings read
Reading credits/english_b_BFA.lang as ASCII
Reading credits/english_a_RB.lang as ASCII
Reading credits/english.lang as ASCII
--------- Initializing Game ----------
gamename: baseDOOM-1
gamedate: Aug 15 2023
Initializing event system
...535 event definitions
Initializing class hierarchy
...160 classes, 1001520 bytes for event callbacks
Initializing scripts
/proc/cpuinfo CPU frequency: 4800.35 MHz
Compiled '/home/rathmox/.local/opt/doom-bfa/base/script/doom_main.script': 143.1 ms
---------- Compile stats ----------

Memory usage:
     Strings: 120, 16800 bytes
  Statements: 95386, 3815440 bytes
   Functions: 3070, 521288 bytes
   Variables: 239712 bytes
    Mem used: 6352856 bytes
 Static data: 6295200 bytes
   Allocated: 8664336 bytes
 Thread size: 14072 bytes

...6 aas types
game initialized.
--------------------------------------
Loaded FFMPEG file: 'video/intro/introloop.bik', looping=1512x512, 30.000000 FPS, 12.000000 sec
Binarize File: '_cinematic' - reason 'generated image'
Loaded FFMPEG file: 'video/mars1.bik', looping=0512x512, 30.000000 FPS, 32.166668 sec
Binarize File: '_cinematic' - reason 'generated image'
Loaded FFMPEG file: 'video/mars_rotation.bik', looping=11567x406, 30.000000 FPS, 100.000000 sec
Binarize File: '_cinematic' - reason 'generated image'
----- idRenderModelManagerLocal::EndLevelLoad -----
    0 models purged from previous level,     3 models kept.
---------------------------------------------------
----- idImageManager::EndLevelLoad -----
   22 images loaded in   0.0 seconds
----------------------------------------
----- idSoundSystemLocal::EndLevelLoad -----
sound: missing efxs/.efx
    7 sounds loaded in   0.0 seconds
----------------------------------------
------------- Warnings ---------------
during DOOM: BFA Edition initialization...
WARNING: Unable to open resource file maps/_startup.resources
WARNING: Error when trying to use Wayland: wayland not available
Reverting to the original Video Driver

WARNING: unknown event 336
WARNING: Couldn't load image: guis/assets/splash/legal_photosensitivity : guis/assets/splash/legal_photosensitivity#__0200
WARNING: Couldn't load image: splashbink : splashbink#__0200
5 warnings
Preloading images...
00362 images preloaded ( or were already loaded ) in   0.1 seconds
----------------------------------------
00259 sounds preloaded in   0.0 seconds
----------------------------------------
WARNING: Couldn't load image: _doomClassic : _doomClassic#__0200
--- Common Initialization Complete ---
QA Timing IIS: 015895ms
WARNING: terminal type 'xterm-256color' is unknown. terminal support may not work correctly
terminal support enabled ( use +set in_tty 0 to disabled )
pid: 36754
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
Sys_QueEvent: overflow
session->GetSaveGameManager().CancelToTerminate();
soundSystem->StopAllSounds();
Stop();
--------- Game Map Shutdown ----------
--------------------------------------
CleanupShell();
delete loadGUI;
delete renderWorld;
delete soundWorld;
delete menuSoundWorld;
session->ShutdownSoundRelatedSystems();
session->Shutdown();
game->Leaderboards_Shutdown();
uiManager->Shutdown();
soundSystem->Shutdown();
usercmdGen->Shutdown();
eventLoop->Shutdown();
declManager->Shutdown();
renderSystem->Shutdown();
idRenderSystem::Shutdown()
Shutting down OpenGL subsystem
commonDialog.Shutdown();
UnloadGameDLL();
------------ Game Shutdown -----------
--------- Game Map Shutdown ----------
--------------------------------------
Shutdown event system
--------------------------------------
saveFile.Clear( true );
stringsFile.Clear( true );
CloseLogFile();
fileSystem->Shutdown( false );
Sys_Shutdown();
console->Shutdown();
idKeyInput::Shutdown();
cvarSystem->Shutdown();
cmdSystem->Shutdown();
ClearWarnings( DOOM 3: BFG Edition " shutdown" );
warningCaption.Clear();
errorList.Clear();
idLib::ShutDown();
shutdown terminal support
MadDeCoDeR commented 11 months ago

Unrelated. Check the latest nightly builds. Also check if the error persist with wayland

Alerymin commented 11 months ago

Unrelated. Check the latest nightly builds. Also check if the error persist with wayland

I tried on wayland, same issues. I will try the nightly builds

Alerymin commented 11 months ago

Tried the latest nightly on X11 and wayland, same issues, and worse for screen resolution on wayland

MadDeCoDeR commented 11 months ago

Check the latest nightly build if the issue persist

MadDeCoDeR commented 11 months ago

Seems tto be working on the Steam Deck (X11)

Alerymin commented 11 months ago

Your commit fixed it. thanks There is just one other issue, when you resize the window manually, if you leave the window, it gets back to it's small size. it may be because of default settings.