init commit
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
OpenShadingLanguage 1.00
|
||||
# Compiled by oslc 1.13.12.0
|
||||
# options:
|
||||
shader standard_shader
|
||||
param point a_position 0 0 0 %meta{string,attribute,"POSITION"} %read{5,5} %write{0,0} %initexpr
|
||||
param vector a_normal 0 1 0 %meta{string,attribute,"NORMAL"} %read{7,7} %write{2147483647,-1}
|
||||
param float[2] a_uv 0 0 %meta{string,attribute,"TEXCOORD_0"} %read{8,8} %write{2147483647,-1}
|
||||
oparam point v_position 0 0 0 %read{9,11} %write{6,6}
|
||||
oparam vector v_normal 0 1 0 %read{2147483647,-1} %write{7,7}
|
||||
oparam float[2] v_uv 0 0 %read{2147483647,-1} %write{8,8}
|
||||
oparam vector v_toCamera 0 0 0 %read{2147483647,-1} %write{10,10}
|
||||
oparam vector v_toLight 0 0 0 %read{2147483647,-1} %write{12,12}
|
||||
local matrix mat_world %read{5,5} %write{1,1}
|
||||
local matrix mat_camera_view_proj %read{6,6} %write{2,2}
|
||||
local point camera_position %read{9,9} %write{3,3}
|
||||
local point light0_position %read{11,11} %write{4,4}
|
||||
const vector $const1 0 0 0 %read{0,0} %write{2147483647,-1}
|
||||
temp int $tmp1 %read{2147483647,-1} %write{1,1}
|
||||
const string $const2 "self:world_transform" %read{1,1} %write{2147483647,-1}
|
||||
temp int $tmp2 %read{2147483647,-1} %write{2,2}
|
||||
const string $const3 "camera:view_proj" %read{2,2} %write{2147483647,-1}
|
||||
temp int $tmp3 %read{2147483647,-1} %write{3,3}
|
||||
const string $const4 "camera:position" %read{3,3} %write{2147483647,-1}
|
||||
temp int $tmp4 %read{2147483647,-1} %write{4,4}
|
||||
const string $const5 "light0:position" %read{4,4} %write{2147483647,-1}
|
||||
temp point $tmp5 %read{6,6} %write{5,5}
|
||||
temp vector $tmp6 %read{10,10} %write{9,9}
|
||||
temp vector $tmp7 %read{12,12} %write{11,11}
|
||||
code a_position
|
||||
# test_vertex_shader.osl:6
|
||||
# point a_position = vector(0, 0, 0) [[ string attribute="POSITION"]],
|
||||
assign a_position $const1 %filename{"test_vertex_shader.osl"} %line{6} %argrw{"wr"}
|
||||
code ___main___
|
||||
# test_vertex_shader.osl:19
|
||||
# getattribute("self:world_transform", mat_world);
|
||||
getattribute $tmp1 $const2 mat_world %filename{"test_vertex_shader.osl"} %line{19} %argrw{"wrw"}
|
||||
# test_vertex_shader.osl:25
|
||||
# getattribute("camera:view_proj", mat_camera_view_proj);
|
||||
getattribute $tmp2 $const3 mat_camera_view_proj %line{25} %argrw{"wrw"}
|
||||
# test_vertex_shader.osl:28
|
||||
# getattribute("camera:position", camera_position);
|
||||
getattribute $tmp3 $const4 camera_position %line{28} %argrw{"wrw"}
|
||||
# test_vertex_shader.osl:31
|
||||
# getattribute("light0:position", light0_position);
|
||||
getattribute $tmp4 $const5 light0_position %line{31} %argrw{"wrw"}
|
||||
# test_vertex_shader.osl:34
|
||||
# v_position = transform(mat_camera_view_proj, transform(mat_world, a_position));
|
||||
transform $tmp5 mat_world a_position %line{34} %argrw{"wrr"}
|
||||
transform v_position mat_camera_view_proj $tmp5 %argrw{"wrr"}
|
||||
# test_vertex_shader.osl:35
|
||||
# v_normal = a_normal;
|
||||
assign v_normal a_normal %line{35} %argrw{"wr"}
|
||||
# test_vertex_shader.osl:36
|
||||
# v_uv = a_uv;
|
||||
arraycopy v_uv a_uv %line{36} %argrw{"wr"}
|
||||
# test_vertex_shader.osl:38
|
||||
# v_toCamera = normalize(camera_position-v_position);
|
||||
sub $tmp6 camera_position v_position %line{38} %argrw{"wrr"}
|
||||
normalize v_toCamera $tmp6 %argrw{"wr"}
|
||||
# test_vertex_shader.osl:39
|
||||
# v_toLight = normalize(light0_position-v_position);
|
||||
sub $tmp7 light0_position v_position %line{39} %argrw{"wrr"}
|
||||
normalize v_toLight $tmp7 %argrw{"wr"}
|
||||
end
|
||||
Reference in New Issue
Block a user