2019-10-27 10:12:03 +01:00
|
|
|
{"connections":[{"from":"nm_convolution","from_port":0,"to":"nm_postprocess","to_port":0},{"from":"nm_postprocess","from_port":0,"to":"gen_outputs","to_port":0},{"from":"gen_inputs","from_port":0,"to":"buffer","to_port":0},{"from":"buffer","from_port":0,"to":"nm_convolution","to_port":0}],"label":"Normal Map","name":"normal_map","node_position":{"x":0,"y":0},"nodes":[{"name":"buffer","node_position":{"x":-687.663818,"y":125.60614},"parameters":{"size":10},"type":"buffer"},{"convolution_params":{"input_type":"f","matrix":[[[-1,-1,0],[0,-2,0],[1,-1,0]],[[-2,0,0],0,[2,0,0]],[[-1,1,0],[0,2,0],[1,1,0]]],"output_type":"rgb","x":1,"y":1},"name":"nm_convolution","node_position":{"x":-690.25,"y":174.25},"parameters":{"size":10},"type":"convolution"},{"name":"nm_postprocess","node_position":{"x":-690.25,"y":222.25},"parameters":{"amount":1,"format":0,"size":10,"type":0},"shader_model":{"code":"","global":"vec3 process_normal_default(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*multiplier+vec3(0.0, 0.0, -1.0))+vec3(0.5);\n}\n\nvec3 process_normal_opengl(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*multiplier+vec3(0.0, 0.0, 1.0))+vec3(0.5);\n}\n\nvec3 process_normal_directx(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*vec3(1.0, -1.0, 1.0)*multiplier+vec3(0.0, 0.0, 1.0))+vec3(0.5);\n}\n","inputs":[{"default":"vec3(0.0)","label":"","name":"in","type":"rgb"}],"instance":"","name":"NormalMapPostProcess","outputs":[{"rgb":"process_normal_$format($in($uv).xyz, $amount*$size/128.0)","type":"rgb"}],"parameters":[{"default":0,"label":"","name":"format","type":"enum","values":[{"name":"Default","value":"default"},{"name":"OpenGL","value":"opengl"},{"name":"DirectX","value":"directx"}]},{"default":9,"first":4,"label":"","last":11,"name":"size","type":"size"},{"default":1,"label":"","max":2,"min":0,"name":"amount","step":0.005,"type":"float"}]},"type":"shader"},{"name":"gen_parameters","node_position":{"x":-692.910156,"y":-4.916687},"parameters":{"amount":0.3,"param0":0,"param1":10,"param2":1,"param3":11,"size":4},"type":"remote","widgets":[{"label":"","linked_widgets":[{"node":"nm_postprocess","widget":"format"}],"name":"param0","type":"linked_control"},{"label":"","linked_widgets":[{"node":"buffer","widget":"size"},{"node":"nm_convolution","widget":"size"},{"node":"nm_postprocess","widget":"size"}],"name":"param1","type":"linked_control"},{"label":"","linked_widgets":[{"node":"nm_postprocess","widget":"amount"}],"name":"param2","type":"linked_control"}]},{"name":"gen_outputs","node_position":{"x":-407.663818,"y":151.047363},"parameters":{},"ports":[{"name":"port0","type":"rgba"}],"type":"ios"},{"name":"gen_inputs","node_position":{"x":-870.910156,"y":157.047363},"parameters":{},"ports":[{"name":"port0","type":"rgba"}],"type":"ios"}],"parameters":{"amount":0.3,"param0":0,"param1":10,"param2":1,"size":4},"type":"graph"}
|