mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Fix example 31-rsm Vulkan shaders (#2453)
This commit is contained in:
@@ -53,19 +53,9 @@ vec3 calcLight(int _idx, mat3 _tbn, vec3 _wpos, vec3 _normal, vec3 _view)
|
||||
return rgb;
|
||||
}
|
||||
|
||||
mat3 mtx3FromCols(vec3 c0, vec3 c1, vec3 c2)
|
||||
{
|
||||
#if BGFX_SHADER_LANGUAGE_GLSL
|
||||
return mat3(c0, c1, c2);
|
||||
#else
|
||||
return transpose(mat3(c0, c1, c2));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
mat3 tbn = mtx3FromCols(v_tangent, v_bitangent, v_normal);
|
||||
mat3 tbn = mtxFromCols(v_tangent, v_bitangent, v_normal);
|
||||
|
||||
vec3 normal;
|
||||
normal.xy = texture2D(s_texNormal, v_texcoord0).xy * 2.0 - 1.0;
|
||||
|
||||
Reference in New Issue
Block a user