From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

Week 3

What I did this week

Continued work on half float implementation. (8128f8de, 2ef0cd4f). Not much code was written, because I spend most time on research and tests. Especially GPU code is a challenge.

  • OpenCL knows half, half2 and half4 data types. CUDA only knows half and half2, for CPU we declare it ourselves. There is very little to no documentation online on how to use half float textures on GPU. It's unclear to me if tex2D returns float/float4 data, or if we have to manually convert the half floats to float. According to CUDA header files (again, couldnt find real docs, so had to read headers..) there is no half return type for tex2D, so I must assume it's either done on the fly or we should use ushort /ushort4 return types.

Other Cycles activities

Next week

I am still 1 week ahead of schedule, but I think I should tackle half floats a bit different. So my proposal for next week is:

  • Finish half float implementation for CPU. That means, support for half OpenEXR textures and data textures (Vertex Normals). I also will double check half <-> float conversion code to see if it's accurate.
  • Once that is done, I will start checking CUDA with single channel half floats. Once that works half4.

Questions

None.