Export (0) Print
Expand All
abs
all
any
cos
ddx
ddy
dot
dst
exp
fma
lit
log
mad
max
min
mul
pow
rcp
sin
tan
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

firstbithigh function

Gets the location of the first set bit starting from the highest order bit and working downward, per component.

Syntax

int firstbithigh(
  in  int value
);

Parameters

value [in]

Type: int

The input value.

Return value

Type: int

The location of the first set bit.

Remarks

For a signed integer, the first significant bit is zero for a negative number.

The following overloaded versions are also available:


int2 firstbithigh(int2 value);
int3 firstbithigh(int3 value);
int4 firstbithigh(int4 value);
uint firstbithigh(uint value);
uint2 firstbithigh(uint2 value);
uint3 firstbithigh(uint3 value);
uint4 firstbithigh(uint4 value);

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 5 and higher shader modelsyes

 

This function is supported in the following types of shaders:

VertexHullDomainGeometryPixelCompute
xxxxxx

 

See also

Shader Model 5

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.