yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Tim FoleyMerge pull request #124 from tfoleyNV/gh-122c5ed9e8d6

master
621 B32 linesraw
1#version 450
2//TEST_IGNORE_FILE:
3
4layout(binding = 0)
5uniform sampler SLANG_hack_samplerForTexelFetch;
6
7layout(binding = 1)
8uniform texture2D t;
9
10vec4 main_()
11{
12	uint x, y, mipCount;
13
14	x = textureSize(sampler2D(t,SLANG_hack_samplerForTexelFetch), 0).x;
15	y = textureSize(sampler2D(t,SLANG_hack_samplerForTexelFetch), 0).y;
16	mipCount = textureQueryLevels(sampler2D(t,SLANG_hack_samplerForTexelFetch));
17
18    return vec4(
19    	float(x),
20    	float(y),
21    	float(mipCount),
22    	0.0);
23}
24
25layout(location = 0)
26out vec4 SLANG_out_main_result;
27
28void main()
29{
30	vec4 main_result = main_();
31	SLANG_out_main_result = main_result;
32}