VisualMaterialPlayerBlue.tres 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. [gd_resource type="ShaderMaterial" load_steps=31 format=2]
  2. [ext_resource path="res://entities/player/Playersphere_normal.png" type="Texture" id=1]
  3. [ext_resource path="res://entities/player/Playersphere_roughness.png" type="Texture" id=2]
  4. [ext_resource path="res://entities/player/Playersphere_color_blue.png" type="Texture" id=3]
  5. [sub_resource type="VisualShaderNodeScalarOp" id=4]
  6. default_input_values = [ 0, 1.0, 1, 0.0 ]
  7. operator = 2
  8. [sub_resource type="VisualShaderNodeColorUniform" id=11]
  9. output_port_for_preview = 0
  10. uniform_name = "GlowColorOff"
  11. [sub_resource type="VisualShaderNodeInput" id=13]
  12. input_name = "uv"
  13. [sub_resource type="VisualShaderNodeTexture" id=14]
  14. texture = ExtResource( 1 )
  15. texture_type = 2
  16. [sub_resource type="VisualShaderNodeTexture" id=15]
  17. texture = ExtResource( 2 )
  18. [sub_resource type="VisualShaderNodeScalarConstant" id=16]
  19. constant = 1.0
  20. [sub_resource type="VisualShaderNodeInput" id=6]
  21. input_name = "normal"
  22. [sub_resource type="VisualShaderNodeInput" id=17]
  23. input_name = "uv"
  24. [sub_resource type="VisualShaderNodeScalarOp" id=18]
  25. default_input_values = [ 0, -0.57, 1, 0.0 ]
  26. [sub_resource type="VisualShaderNodeScalarOp" id=19]
  27. default_input_values = [ 0, 2.4, 1, 0.0 ]
  28. operator = 2
  29. [sub_resource type="VisualShaderNodeScalarOp" id=20]
  30. default_input_values = [ 0, 0.0, 1, 1.0 ]
  31. operator = 5
  32. [sub_resource type="VisualShaderNodeInput" id=22]
  33. input_name = "view"
  34. [sub_resource type="VisualShaderNodeVectorFunc" id=23]
  35. [sub_resource type="VisualShaderNodeScalarUniform" id=24]
  36. uniform_name = "GlowStrength"
  37. [sub_resource type="VisualShaderNodeScalarFunc" id=25]
  38. function = 19
  39. [sub_resource type="VisualShaderNodeScalarOp" id=26]
  40. default_input_values = [ 0, 1.0, 1, 0.0 ]
  41. [sub_resource type="VisualShaderNodeScalarUniform" id=27]
  42. uniform_name = "GlowFactor"
  43. [sub_resource type="VisualShaderNodeTextureUniform" id=28]
  44. uniform_name = "base_tex"
  45. texture_type = 1
  46. [sub_resource type="VisualShaderNodeScalarUniform" id=29]
  47. uniform_name = "Glowing"
  48. [sub_resource type="VisualShaderNodeColorUniform" id=30]
  49. output_port_for_preview = 0
  50. uniform_name = "GlowColorOn"
  51. [sub_resource type="VisualShaderNodeVectorInterp" id=31]
  52. default_input_values = [ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 1, 1, 1 ) ]
  53. [sub_resource type="VisualShaderNodeVectorInterp" id=32]
  54. default_input_values = [ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 1, 1, 1 ) ]
  55. [sub_resource type="VisualShaderNodeColorConstant" id=33]
  56. constant = Color( 0, 0, 0, 1 )
  57. [sub_resource type="VisualShaderNodeScalarOp" id=34]
  58. default_input_values = [ 0, 0.0, 1, 0.2 ]
  59. operator = 2
  60. [sub_resource type="VisualShaderNodeDotProduct" id=7]
  61. [sub_resource type="VisualShaderNodeVectorInterp" id=9]
  62. default_input_values = [ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 1, 1, 1 ) ]
  63. [sub_resource type="VisualShader" id=1]
  64. code = "shader_type spatial;
  65. uniform sampler2D base_tex : hint_albedo;
  66. uniform vec4 GlowColorOff : hint_color;
  67. uniform vec4 GlowColorOn : hint_color;
  68. uniform float Glowing;
  69. uniform float GlowStrength;
  70. uniform float GlowFactor;
  71. uniform sampler2D tex_frg_18;uniform sampler2D tex_frg_17 : hint_normal;
  72. void vertex() {
  73. // Output:0
  74. }
  75. void fragment() {
  76. // Input:16
  77. vec3 n_out16p0;
  78. n_out16p0 = vec3(UV,0.0);
  79. // TextureUniform:32
  80. vec3 n_out32p0;
  81. float n_out32p1;
  82. {
  83. vec4 n_tex_read = texture( base_tex , n_out16p0.xy );
  84. n_out32p0 = n_tex_read.rgb;
  85. n_out32p1 = n_tex_read.a;
  86. }
  87. // ColorUniform:14
  88. vec3 n_out14p0;
  89. float n_out14p1;
  90. n_out14p0 = GlowColorOff.rgb;
  91. n_out14p1 = GlowColorOff.a;
  92. // ColorUniform:34
  93. vec3 n_out34p0;
  94. float n_out34p1;
  95. n_out34p0 = GlowColorOn.rgb;
  96. n_out34p1 = GlowColorOn.a;
  97. // ScalarUniform:33
  98. float n_out33p0;
  99. n_out33p0 = Glowing;
  100. // VectorInterp:35
  101. vec3 n_out35p0;
  102. n_out35p0 = mix( n_out14p0 , n_out34p0 , vec3(n_out33p0) );
  103. // ScalarUniform:27
  104. float n_out27p0;
  105. n_out27p0 = GlowStrength;
  106. // Input:2
  107. vec3 n_out2p0;
  108. n_out2p0 = NORMAL;
  109. // Input:25
  110. vec3 n_out25p0;
  111. n_out25p0 = VIEW;
  112. // VectorFunc:26
  113. vec3 n_out26p0;
  114. n_out26p0=normalize(n_out25p0);
  115. // DotProduct:5
  116. float n_out5p0;
  117. n_out5p0 = dot( n_out2p0 , n_out26p0 );
  118. // ScalarUniform:30
  119. float n_out30p0;
  120. n_out30p0 = GlowFactor;
  121. // ScalarOp:23
  122. float n_out23p0;
  123. n_out23p0 = pow( n_out5p0 , n_out30p0 );
  124. // ScalarFunc:28
  125. float n_out28p0;
  126. n_out28p0 = -(n_out23p0);
  127. // ScalarOp:29
  128. float n_in29p0 = 1.00000;
  129. float n_out29p0;
  130. n_out29p0 = n_in29p0 + n_out28p0;
  131. // ScalarOp:11
  132. float n_out11p0;
  133. n_out11p0 = n_out27p0 * n_out29p0;
  134. // VectorInterp:7
  135. vec3 n_out7p0;
  136. n_out7p0 = mix( n_out32p0 , n_out35p0 , vec3(n_out11p0) );
  137. // Input:20
  138. vec3 n_out20p0;
  139. n_out20p0 = vec3(UV,0.0);
  140. // Texture:18
  141. vec3 n_out18p0;
  142. float n_out18p1;
  143. vec4 tex_frg_18_read = texture( tex_frg_18 , n_out20p0.xy );
  144. n_out18p0 = tex_frg_18_read.rgb;
  145. n_out18p1 = tex_frg_18_read.a;
  146. // ScalarOp:22
  147. float n_in22p0 = 2.40000;
  148. float n_out22p0;
  149. n_out22p0 = n_in22p0 * dot(n_out18p0,vec3(0.333333,0.333333,0.333333));
  150. // ScalarOp:21
  151. float n_in21p0 = -0.57000;
  152. float n_out21p0;
  153. n_out21p0 = n_in21p0 + n_out22p0;
  154. // Color:37
  155. vec3 n_out37p0;
  156. float n_out37p1;
  157. n_out37p0 = vec3(0.000000,0.000000,0.000000);
  158. n_out37p1 = 1.000000;
  159. // ScalarOp:38
  160. float n_in38p1 = 0.20000;
  161. float n_out38p0;
  162. n_out38p0 = n_out33p0 * n_in38p1;
  163. // VectorInterp:36
  164. vec3 n_out36p0;
  165. n_out36p0 = mix( n_out37p0 , n_out14p0 , vec3(n_out38p0) );
  166. // Texture:17
  167. vec3 n_out17p0;
  168. float n_out17p1;
  169. vec4 tex_frg_17_read = texture( tex_frg_17 , n_out20p0.xy );
  170. n_out17p0 = tex_frg_17_read.rgb;
  171. n_out17p1 = tex_frg_17_read.a;
  172. // Scalar:19
  173. float n_out19p0;
  174. n_out19p0 = 1.000000;
  175. // Output:0
  176. ALBEDO = n_out7p0;
  177. ROUGHNESS = n_out21p0;
  178. EMISSION = n_out36p0;
  179. NORMALMAP = n_out17p0;
  180. NORMALMAP_DEPTH = n_out19p0;
  181. }
  182. void light() {
  183. // Output:0
  184. }
  185. "
  186. graph_offset = Vector2( -203.427, -129.92 )
  187. nodes/fragment/0/position = Vector2( 600, 140 )
  188. nodes/fragment/2/node = SubResource( 6 )
  189. nodes/fragment/2/position = Vector2( -740, 100 )
  190. nodes/fragment/5/node = SubResource( 7 )
  191. nodes/fragment/5/position = Vector2( -520, 100 )
  192. nodes/fragment/7/node = SubResource( 9 )
  193. nodes/fragment/7/position = Vector2( 440, -120 )
  194. nodes/fragment/11/node = SubResource( 4 )
  195. nodes/fragment/11/position = Vector2( 260, 0 )
  196. nodes/fragment/14/node = SubResource( 11 )
  197. nodes/fragment/14/position = Vector2( -160, -700 )
  198. nodes/fragment/16/node = SubResource( 13 )
  199. nodes/fragment/16/position = Vector2( -240, -220 )
  200. nodes/fragment/17/node = SubResource( 14 )
  201. nodes/fragment/17/position = Vector2( 220, 340 )
  202. nodes/fragment/18/node = SubResource( 15 )
  203. nodes/fragment/18/position = Vector2( -220, 260 )
  204. nodes/fragment/19/node = SubResource( 16 )
  205. nodes/fragment/19/position = Vector2( 200, 560 )
  206. nodes/fragment/20/node = SubResource( 17 )
  207. nodes/fragment/20/position = Vector2( -480, 440 )
  208. nodes/fragment/21/node = SubResource( 18 )
  209. nodes/fragment/21/position = Vector2( 260, 180 )
  210. nodes/fragment/22/node = SubResource( 19 )
  211. nodes/fragment/22/position = Vector2( 20, 220 )
  212. nodes/fragment/23/node = SubResource( 20 )
  213. nodes/fragment/23/position = Vector2( -320, 60 )
  214. nodes/fragment/25/node = SubResource( 22 )
  215. nodes/fragment/25/position = Vector2( -940, 200 )
  216. nodes/fragment/26/node = SubResource( 23 )
  217. nodes/fragment/26/position = Vector2( -760, 200 )
  218. nodes/fragment/27/node = SubResource( 24 )
  219. nodes/fragment/27/position = Vector2( -220, -100 )
  220. nodes/fragment/28/node = SubResource( 25 )
  221. nodes/fragment/28/position = Vector2( -240, -20 )
  222. nodes/fragment/29/node = SubResource( 26 )
  223. nodes/fragment/29/position = Vector2( -20, 0 )
  224. nodes/fragment/30/node = SubResource( 27 )
  225. nodes/fragment/30/position = Vector2( -600, -220 )
  226. nodes/fragment/32/node = SubResource( 28 )
  227. nodes/fragment/32/position = Vector2( 20, -260 )
  228. nodes/fragment/33/node = SubResource( 29 )
  229. nodes/fragment/33/position = Vector2( -460, -400 )
  230. nodes/fragment/34/node = SubResource( 30 )
  231. nodes/fragment/34/position = Vector2( -160, -480 )
  232. nodes/fragment/35/node = SubResource( 31 )
  233. nodes/fragment/35/position = Vector2( 280, -400 )
  234. nodes/fragment/36/node = SubResource( 32 )
  235. nodes/fragment/36/position = Vector2( 660, -480 )
  236. nodes/fragment/37/node = SubResource( 33 )
  237. nodes/fragment/37/position = Vector2( 480, -320 )
  238. nodes/fragment/38/node = SubResource( 34 )
  239. nodes/fragment/38/position = Vector2( 420, -540 )
  240. nodes/fragment/connections = PoolIntArray( 2, 0, 5, 0, 7, 0, 0, 0, 17, 0, 0, 8, 19, 0, 0, 9, 20, 0, 17, 0, 20, 0, 18, 0, 18, 0, 22, 1, 22, 0, 21, 1, 25, 0, 26, 0, 26, 0, 5, 1, 5, 0, 23, 0, 23, 0, 28, 0, 28, 0, 29, 1, 29, 0, 11, 1, 11, 0, 7, 2, 27, 0, 11, 0, 30, 0, 23, 1, 16, 0, 32, 0, 32, 0, 7, 0, 14, 0, 35, 0, 34, 0, 35, 1, 33, 0, 35, 2, 35, 0, 7, 1, 37, 0, 36, 0, 14, 0, 36, 1, 36, 0, 0, 5, 33, 0, 38, 0, 38, 0, 36, 2, 21, 0, 0, 3 )
  241. [resource]
  242. shader = SubResource( 1 )
  243. shader_param/GlowColorOff = Color( 0.160784, 0.172549, 1, 1 )
  244. shader_param/GlowColorOn = Color( 0.780392, 0.784314, 1, 1 )
  245. shader_param/Glowing = 0.0
  246. shader_param/GlowStrength = 4.0
  247. shader_param/GlowFactor = 0.2
  248. shader_param/base_tex = ExtResource( 3 )