Jump to content

  • Log In with Google      Sign In   
  • Create Account

Alaryn

Member Since 08 Mar 2011
Offline Last Active Oct 28 2012 01:45 PM

Posts I've Made

In Topic: f32tof16 confusion

20 August 2012 - 02:43 AM

Thank you all. After some time I realized that I just didn't understand HLSL implicit conversions and that was general problem for me. ;)

For example, if I want to get "raw" float16 value, I must set RT format to R16G16B16_FLOAT (simplest way) or R32G32B32_UINT (in this case, the value is stored in the LSB).
And if want to send the value via semantic (to another shader), I just have to set its type to uint. Then, the f32tof16 intrinsic works as I want it to work.

In Topic: f32tof16 confusion

17 August 2012 - 04:32 AM

Hmm, I switched render target format to R16G16B16_FLOAT and use following shader:

float4 PS(in float4 vPosition : SV_POSITION) : SV_TARGET
{
	return float4(f32tof16(1.5), 1.5, 1, 1);
}

And finally I looked up the output. The red channel was 0x73c0 (incorrect) and the blue channel 0x3e00 (correct 1.5 representation).

In Topic: f32tof16 confusion

17 August 2012 - 03:45 AM

That's working, thank you, but documentation says that f32tof16 returns uint and I thought, that float16 bits will be stored in the lower part of uint similarly to f16tof32, where it reads from these bits.

In Topic: can't find the replacement of the glaux header file and lib.

29 December 2011 - 04:54 PM

Well, glaux is pretty ancient library and so is glut (another common tool for OpenGL context management). I would recommend freeglut for your first applications using OpenGL. And you should know that OpenGL is only some kind of standard so there will be no SDK such as DirectX SDK. There is the docummentation of course, but for samples you should search third party sites.

PARTNERS