This gives a minor speedup (~5%) for viewport render for simple scenes
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- cycles_simpify_rastertocamera
Event Timeline
Comment Actions
Based in the fact, that no rotation/shear transformations are used with rastertocamera transform, and perspective coefficient is never zero (how could it be?).
Also it looks like transform_perspective in msvc is affected by a similar problem, that was fixed in rBbf11e362c5418ec40dc0437d329efceb225eb5ef. Anyway, this patch replaces full matrix transformation with 2 fma's and removes 3 divisions from critical path (division unit of sandy bridge and haswell arch is overloaded for camera_sample).
Comment Actions
Several things here:
- This code is run once per pixel per sample, so it's really weird that the change gives 5% speedup.
- I don't see any measurable difference on both CPU and GPU here.
- Cycles api is actually prefers to use float2/float3/float4 for arguments communication instead of passing separate arguments
- Is this 2d3d thing something commonly used to denote transformation related on only translation/scale?
- move is something new term, guess it should be translation ?
Comment Actions
Superseded by completely another more complex approach. Still experimenting, but new patch has nothing common with this patch, so closing this one.