Suppose I have one shader storage buffer and you want to have several views in it, for example. eg:
layout(std430,binding=0) buffer FloatView { float floats[]; }; layout(std430,binding=0) buffer IntView { int ints[]; };
Is this legal GLSL? opengl.org says no:
Two blocks cannot use the same index.
However, I could not find such a statement in the GL 4.5 Core Spec or GLSL 4.50 Spec (or the description of the ARB_shader_storage_buffer_object extension ), and my NVIDIA driver seems to compile such code without errors or warnings.
OpenGL ? . , , , , .
, -. OpenGL .
"" , . .
. , -. , :
: , , , SSBOs., , (, ).
, . , GLSL .
7 GLSL 4.5:
.
"fixed", glUniform/ShaderStorageBlockBinding. , .
glUniform/ShaderStorageBlockBinding
Source: https://habr.com/ru/post/1624285/More articles:Jvm memory frequency changes often - javaConda is looking for the oldest version of numpy limited to the Python version - pythonHow to get around or implement IComparable - c #A tool to create a database diagram in SQL Azure - sqlASP.NET 5 System.Runtime.Caching - asp.net-coreHow did instagram implement its login screen? - androidPython: how to determine a specific Linux distribution? - pythonLazy expires class - c #Error executing * .msi file created using Visual Studio - c #The name of the dynamic laravel PHP class is phpAll Articles