Skip to content

Discussion regarding float packing for data sent to GPU #2424

Answered by bkaradzic
Qix- asked this question in Q&A
Discussion options

You must be logged in to vote

Try using different type uniforms with D3D compiler, and observe layout in disassembly.

You would get:

float3 x; // 1x 32-bit padding here;
float2 y; // 2x 32-bit padding here;
float4 z; // no padding
float  w; // 3x 32-bit padding here;

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Qix-
Comment options

@Qix-
Comment options

@bkaradzic
Comment options

@Qix-
Comment options

Answer selected by Qix-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants