yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
38ed03a72
master
1RaytracingAccelerationStructure gScene_0 :register ( t0 ); 2 3RWStructuredBuffer < int > gOutput_0 :register ( u0 ); 4 5float3 helper_0 ( RayQuery < int ( 0 ) > q_0 ) 6{ 7RayQuery < int ( 0 ) > _S1 = q_0 ; 8 9RayDesc ray_0 ; 10float3 _S2 = ( float3 ) 0.0 ; 11 12ray_0 . Origin = _S2 ; 13ray_0 . Direction = _S2 ; 14ray_0 . TMin = 0.0 ; 15ray_0 . TMax = 1000.0 ; 16_S1 . TraceRayInline ( gScene_0 , 0U , 4294967295U , ray_0 ); 17 18return _S1 . WorldRayDirection (); 19} 20 21 22[ shader ( "compute" )][ numthreads ( 1 , 1 , 1 )] 23void computeMain ( uint tid_0 : SV_DISPATCHTHREADID ) 24{ 25RayQuery < int ( 0 ) > rayQuery_0 ; 26 27int _S3 = int ( helper_0 ( rayQuery_0 ). x ); 28 29gOutput_0 [ tid_0 . x ] = _S3 ; 30return ; 31} 32