Open spezi opened 4 months ago
I tried to use gfx images with several image types and on Linux and osx platform, but score crashes with invalid fragment shader.
console output of ossia.score-3.2.1-linux-amd64.AppImage on linux:
Debug: "ERROR: :28: 'renderSize' : undeclared identifier \nERROR: :28: '' : compilation terminated \nERROR: 2 compilation errors. No code generated." (:0) Debug: #version 450 layout(std140, binding = 0) uniform renderer_t { mat4 clipSpaceCorrMatrix; vec2 renderSize; } renderer;
layout(std140, binding = 2) uniform material_t { int idx; float opacity; vec2 position; vec2 scale; vec2 _imageSize; } mat;
layout(binding=3) uniform sampler2D y_tex;
layout(location = 0) in vec2 v_texcoord; layout(location = 0) out vec4 fragColor;
vec2 norm_texcoord(vec2 tc) { vec2 tex_sz = textureSize(y_tex, 0); return tc * mat._imageSize / tex_sz; }
void main () { float viewportAspect = renderSize.x / renderSize.y; float imageAspect = mat._imageSize.x / mat._imageSize.y;
vec2 pos = v_texcoord; // Aspect ratio // Our mesh is: -1, -1; 1, -1; -1, 1; 1, 1;
pos.x /= viewportAspect; pos.y /= imageAspect;
vec4 tex = texture(y_tex, norm_texcoord(pos / mat.scale + mat.position)); fragColor = tex * mat.opacity; } (:0)
console output of ossia score 3.2.4 on osx:
Warning: Attempted to set unsupported sample count 16 (:0) Warning: QSpirvCompiler: Failed to parse shader (:0) Debug: "ERROR: :28: 'renderSize' : undeclared identifier \nERROR: :28: '' : compilation terminated \nERROR: 2 compilation errors. No code generated." (:0) Debug: #version 450 layout(std140, binding = 0) uniform renderer_t { mat4 clipSpaceCorrMatrix; vec2 renderSize; } renderer;
vec4 tex = texture(y_tex, norm_texcoord(pos / mat.scale + mat.position)); fragColor = tex * mat.opacity; } (:0) libc++abi: terminating with uncaught exception of type std::runtime_error zsh: abort ./ossia\ score
Should be fixed in 3.3 !
I tried to use gfx images with several image types and on Linux and osx platform, but score crashes with invalid fragment shader.
console output of ossia.score-3.2.1-linux-amd64.AppImage on linux:
Debug: "ERROR: :28: 'renderSize' : undeclared identifier \nERROR: :28: '' : compilation terminated \nERROR: 2 compilation errors. No code generated." (:0) Debug: #version 450 layout(std140, binding = 0) uniform renderer_t { mat4 clipSpaceCorrMatrix; vec2 renderSize; } renderer;
layout(std140, binding = 2) uniform material_t { int idx; float opacity; vec2 position; vec2 scale; vec2 _imageSize; } mat;
layout(binding=3) uniform sampler2D y_tex;
layout(location = 0) in vec2 v_texcoord; layout(location = 0) out vec4 fragColor;
vec2 norm_texcoord(vec2 tc) { vec2 tex_sz = textureSize(y_tex, 0); return tc * mat._imageSize / tex_sz; }
void main () { float viewportAspect = renderSize.x / renderSize.y; float imageAspect = mat._imageSize.x / mat._imageSize.y;
vec2 pos = v_texcoord; // Aspect ratio // Our mesh is: -1, -1; 1, -1; -1, 1; 1, 1;
pos.x /= viewportAspect; pos.y /= imageAspect;
vec4 tex = texture(y_tex, norm_texcoord(pos / mat.scale + mat.position)); fragColor = tex * mat.opacity; } (:0)
console output of ossia score 3.2.4 on osx:
Warning: Attempted to set unsupported sample count 16 (:0) Warning: QSpirvCompiler: Failed to parse shader (:0) Debug: "ERROR: :28: 'renderSize' : undeclared identifier \nERROR: :28: '' : compilation terminated \nERROR: 2 compilation errors. No code generated." (:0) Debug: #version 450 layout(std140, binding = 0) uniform renderer_t { mat4 clipSpaceCorrMatrix; vec2 renderSize; } renderer;
layout(std140, binding = 2) uniform material_t { int idx; float opacity; vec2 position; vec2 scale; vec2 _imageSize; } mat;
layout(binding=3) uniform sampler2D y_tex;
layout(location = 0) in vec2 v_texcoord; layout(location = 0) out vec4 fragColor;
vec2 norm_texcoord(vec2 tc) { vec2 tex_sz = textureSize(y_tex, 0); return tc * mat._imageSize / tex_sz; }
void main () { float viewportAspect = renderSize.x / renderSize.y; float imageAspect = mat._imageSize.x / mat._imageSize.y;
vec2 pos = v_texcoord; // Aspect ratio // Our mesh is: -1, -1; 1, -1; -1, 1; 1, 1;
pos.x /= viewportAspect; pos.y /= imageAspect;
vec4 tex = texture(y_tex, norm_texcoord(pos / mat.scale + mat.position)); fragColor = tex * mat.opacity; } (:0) libc++abi: terminating with uncaught exception of type std::runtime_error zsh: abort ./ossia\ score