I need a manual about GLSL for Vulkan

Hello, everyone

GLSL came from OpenGL
However using GLSL in Vulkan is slightly different from OpenGL, I guess.
I am new to GLSL

Originally, GLSL looks having several built-in variables

gl_Position
gl_PointSize
gl_VertexID
gl_FragCoord
gl_FrontFacing
gl_FragDepth

Also, GLSL has several important keywords or concepts such as
#version 460
sampler2D
push_constant
set
binding
std140
row_major
shared
uniform block layout (uniform buffer object)
interface block
and so on…

I want a good manual or textbook explaining
concepts and grammar above
and how to program Vulkan source codes with this GLSL grammar

I will really appreciate if you can help me

All Vulkan related changes to GLSL are documented here: GLSL/GL_KHR_vulkan_glsl.txt at master · KhronosGroup/GLSL · GitHub

2 Likes

Thank you again, Sascha

I just read briefly the web page you recommended
I found GLSL in Vulkan is different, which I guessed
It is very hard and messy to study Vulkan for me who didn’t even learn OpenGL
There is no universally good book nor lectures(on-line, paid) for Vulkan

So have a nice day and Thanks, Sascha

It should also be noted that, while vulkan_glsl does change a lot about GLSL, it’s mostly about how resources map to different concepts in the language. Most of GLSL is untouched by Vulkan. So most GLSL resources still apply, so long as you keep the KHR_vulkan_glsl changes in mind (basically ignore anything about how a resource like a uniform buffer or sampler2d or whatever connects to the outside world).

Dear Alfonse:
Oh, mostly I understand
I will read the web link above again
Thank you

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.