ShaderUniforms: cleanup, put every "4-float" on a line for clarity

This commit is contained in:
Henrik Rydgård 2022-09-25 17:53:56 +02:00
parent cfa427c37a
commit fc30b04430

View file

@ -17,10 +17,8 @@ enum : uint64_t {
DIRTY_MATDIFFUSE | DIRTY_MATSPECULAR | DIRTY_MATEMISSIVE | DIRTY_AMBIENT,
};
// TODO: Split into two structs, one for software transform and one for hardware transform, to save space.
// Currently 512 bytes. Probably can't get to 256 (nVidia's UBO alignment).
// Currently 480 bytes. Probably can't get to 256 (nVidia's UBO alignment, also common in other vendors).
// Every line here is a 4-float.
struct alignas(16) UB_VS_FS_Base {
float proj[16];
float proj_through[16];
@ -37,14 +35,12 @@ struct alignas(16) UB_VS_FS_Base {
uint32_t colorWriteMask; float mipBias;
// Fragment data
float fogColor[4]; // .w is unused
float texEnvColor[3];
uint32_t colorTestMask;
float texEnvColor[3]; uint32_t colorTestMask;
int alphaColorRef[4];
float blendFixA[3]; float stencil;
float blendFixB[3]; float rotation;
float texClamp[4];
float texClampOffset[2]; // .zw are unused
float fogCoef[2];
float texClampOffset[2]; float fogCoef[2];
};
static const char * const ub_baseStr =