During the Geometry and Pixel,I want to generate matrix to transform position dynamically. If there is a same matrix in attribute of geometry,passing the rasterization, will the matrix in pixel shader be changed? thanks!
A issue about rasterization,What's the way to deal with matrix?
28 views Asked by F.Eazism At
1
The performance of pixel shaders on most GPU hardware is primarily determined by three factors:
Generally speaking, modern GPUs have a lot of ALU bandwidth relative to the memory bandwidth, and the number of interpolators is a fixed resource.
In other words, passing a full matrix down as 3 to 4 interpolators is generally not desirable.
You generally want to have the pixel shader compute it's own transformations for per-pixel lighting, typically using a small number of interpolators and otherwise relying on constant buffers which are fixed for the whole draw operation. It's probably worthwhile to do redundant computations if there's not a simple and compact way to pass the data between stages.