Files
Towards/external/loft/examples/viewer/shaders/Opaque.vert.spirv
T

67 lines
7.8 KiB
Plaintext
Raw Normal View History

2026-07-18 14:31:15 +02:00
# ß
SPV_KHR_non_semantic_info NonSemantic.Shader.DebugInfo.100 GLSL.std.450main-6Icgnx~/home/martin/projects/loft/examples/viewer/shaders/Opaque.vertuintmainü// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed entry-point main
#line 1
#version 450
layout(location = 0) in vec3 pos;
layout(location = 1) in vec3 norm;
layout(location = 2) in vec2 uv;
layout(location = 3) in vec4 tangent;
layout(set = 0, binding = 0) uniform Camera {
mat4 proj;
mat4 view;
} cam;
struct SceneNode {
uint transformIdx;
uint meshIdx;
};
layout(set = 2, binding = 1) uniform ObjectInfo {
SceneNode nodes[];
} objectInfo;
layout(location = 0) out vec3 outPos;
layout(location = 1) out vec3 outNormal;
layout(location = 2) out vec2 outUV;
layout(location = 3) out mat3 outTBN;
layout( push_constant ) uniform constants
{
uint transformIdx;
uint materialIdx;
} PushConstants;
void main() {
vec3 bitangent = cross(norm, tangent.xyz) * tangent.w;
outTBN = mat3(tangent.xyz, bitangent, norm);
outPos = pos.xyz * 0.05;
outNormal = norm.xyz;
outUV = uv;
gl_Position = cam.proj * cam.view * vec4(outPos, 1.0);
}
float&bitangent/norm8tangentDboolKoutTBNeoutPosipospoutNormalzoutUVuvgl_PositionŠgl_PointSizegl_CullDistancegl_PerVertexint view¤Camera©cam¿meshIdxÃSceneNodeÈnodesÌObjectInfoÑobjectInfoÔmaterialIdxØconstantsÞPushConstantsmain$bitangent-norm6tangentIoutTBNcoutPosgposnoutNormalxoutUV~uvgl_PerVertexgl_Positiongl_PointSizegl_ClipDistancegl_CullDistancežCameražprojžview§cam½SceneNode½transformIdx½meshIdxÆObjectInfoÆnodesÏobjectInfoÒconstantsÒtransformIdxÒmaterialIdxÜPushConstantsG-G6GIGcGgGnGxG~GH H H H GžHžHžHž#HžHžHž#@G§!G§"H½#H½#GÄGÆHÆ#GÏ!GÏ"GÒHÒ#HÒ#! +
+ +  
+
 
 #+"+++   
 
  
!+" # " +'# %& '  ) + ,  ;+-+0 ./ ' /-02 3 42 53 ;46 783' 860 < = AC ED
 )CF Bl
F GA HB
;GI+L$ JKBL KI0+R€?+S a b
;ac+f& de f ec0;+g hi f ig0+lÍÌL=;an+q' op q pn0t u vt wu
;vx+{( yzu{ zx0 |t }u ;|~ u{ ~0ƒ 2ƒƒ+ˆ
 3ˆ
+*
 Š
+ŽU
Œ Ž