# HG changeset patch # User sam # Date 1720345342 -25200 # Node ID aceb7697d37c8cea87722a3c918389b714f370ac # Parent 427c11c0aeb13c81df06f4d0dca957f6beb2c1be RGB no supported, must be RGBA diff -r 427c11c0aeb1 -r aceb7697d37c static_utils.nim --- a/static_utils.nim Sun Jul 07 15:09:14 2024 +0700 +++ b/static_utils.nim Sun Jul 07 16:42:22 2024 +0700 @@ -1291,14 +1291,14 @@ reflection: float32 baseColor: Vec3f UniformsA = object - defaultTexture: Texture[TVec3[uint8]] + defaultTexture: Texture[TVec4[uint8]] defaultMaterial: GPUValue[MaterialA, UniformBuffer] materials: GPUValue[array[3, MaterialA], UniformBuffer] - materialTextures: array[3, Texture[TVec3[uint8]]] + materialTextures: array[3, Texture[TVec4[uint8]]] ShaderSettings = object gamma: float32 GlobalsA = object - fontAtlas: Texture[TVec3[uint8]] + fontAtlas: Texture[TVec4[uint8]] settings: GPUValue[ShaderSettings, UniformBuffer] ShaderA = object @@ -1352,16 +1352,16 @@ ) var uniforms1 = DescriptorSet[UniformsA, MaterialSet]( data: UniformsA( - defaultTexture: Texture[TVec3[uint8]](width: 1, height: 1, data: @[TVec3[uint8]([0'u8, 0'u8, 0'u8])]), + defaultTexture: Texture[TVec4[uint8]](width: 1, height: 1, data: @[TVec4[uint8]([0'u8, 0'u8, 0'u8, 1'u8])]), materials: GPUValue[array[3, MaterialA], UniformBuffer](data: [ MaterialA(reflection: 0, baseColor: NewVec3f(1, 0, 0)), MaterialA(reflection: 0.1, baseColor: NewVec3f(0, 1, 0)), MaterialA(reflection: 0.5, baseColor: NewVec3f(0, 0, 1)), ]), materialTextures: [ - Texture[TVec3[uint8]](width: 1, height: 1, data: @[TVec3[uint8]([0'u8, 0'u8, 0'u8])]), - Texture[TVec3[uint8]](width: 1, height: 1, data: @[TVec3[uint8]([0'u8, 0'u8, 0'u8])]), - Texture[TVec3[uint8]](width: 1, height: 1, data: @[TVec3[uint8]([0'u8, 0'u8, 0'u8])]), + Texture[TVec4[uint8]](width: 1, height: 1, data: @[TVec4[uint8]([0'u8, 0'u8, 0'u8, 1'u8])]), + Texture[TVec4[uint8]](width: 1, height: 1, data: @[TVec4[uint8]([0'u8, 0'u8, 0'u8, 1'u8])]), + Texture[TVec4[uint8]](width: 1, height: 1, data: @[TVec4[uint8]([0'u8, 0'u8, 0'u8, 1'u8])]), ] ) ) @@ -1371,7 +1371,7 @@ ) var myGlobals = DescriptorSet[GlobalsA, GlobalSet]( data: GlobalsA( - fontAtlas: Texture[TVec3[uint8]](width: 1, height: 1, data: @[TVec3[uint8]([0'u8, 0'u8, 0'u8])]), + fontAtlas: Texture[TVec4[uint8]](width: 1, height: 1, data: @[TVec4[uint8]([0'u8, 0'u8, 0'u8, 1'u8])]), settings: GPUValue[ShaderSettings, UniformBuffer](data: ShaderSettings(gamma: 1.0)) ) )