mirror of https://github.com/encounter/aurora.git
gx_shader: normalize normal
This commit is contained in:
parent
5d0848d428
commit
5f06d873bc
|
@ -801,7 +801,7 @@ wgpu::ShaderModule build_shader(const ShaderConfig& config, const ShaderInfo& in
|
|||
}
|
||||
}
|
||||
vtxXfrAttrsPre += fmt::format(FMT_STRING("\n var mv_pos = ubuf.pos_mtx * vec4<f32>({}, 1.0);"
|
||||
"\n var mv_nrm = ubuf.nrm_mtx * vec4<f32>({}, 0.0);"
|
||||
"\n var mv_nrm = normalize(ubuf.nrm_mtx * vec4<f32>({}, 0.0));"
|
||||
"\n out.pos = ubuf.proj * vec4<f32>(mv_pos, 1.0);"),
|
||||
vtx_attr(config, GX_VA_POS), vtx_attr(config, GX_VA_NRM));
|
||||
if constexpr (EnableNormalVisualization) {
|
||||
|
|
|
@ -49,7 +49,7 @@ using namespace std::string_view_literals;
|
|||
if (!(cond)) \
|
||||
UNLIKELY FATAL(msg, ##__VA_ARGS__)
|
||||
#ifdef NDEBUG
|
||||
#define CHECK
|
||||
#define CHECK(cond, msg, ...)
|
||||
#else
|
||||
#define CHECK(cond, msg, ...) ASSERT(cond, msg, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue