Guest User

terraincreatedshaders

a guest
Sep 5th, 2013
169
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Mesh: Loading sphere.mesh.
  2. DefaultWorkQueueBase('Root') - QUEUED(thread:3024): ID=1 channel=2 requestType=1
  3. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_START(3024): ID=1 channel=2 requestType=1
  4. Terrain created; size=513 minBatch=33 maxBatch=65 treeDepth=4 lodLevels=5 leafLods=2
  5. Terrain::distributeVertexData processing source terrain size of 513
  6. Assigning vertex data, resolution=513 startDepth=2 endDepth=4 splits=4
  7. Assigning vertex data, resolution=129 startDepth=0 endDepth=2 splits=1
  8. Terrain::distributeVertexData finished
  9. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_END(3024): ID=1 channel=2 requestType=1 processed=1
  10. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_START(thread:3024): ID=1 success=1 messages=[] channel=2 requestType=1
  11. DefaultWorkQueueBase('Root') - QUEUED(thread:3024): ID=2 channel=4 requestType=1
  12. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_START(3024): ID=2 channel=4 requestType=1
  13. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_END(3024): ID=2 channel=4 requestType=1 processed=1
  14. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_START(thread:3024): ID=2 success=1 messages=[] channel=4 requestType=1
  15. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_END(thread:3024): ID=2 success=1 messages=[] channel=4 requestType=1
  16. DefaultWorkQueueBase('Root') - QUEUED(thread:3024): ID=3 channel=3 requestType=1
  17. *** Terrain Vertex Program: OgreTerrain/3499275481/sm2/vp/hlod ***
  18. void main_vp(
  19. float2 posIndex : POSITION,
  20. float height : TEXCOORD0,
  21. float2 delta : TEXCOORD1,
  22. uniform float4x4 worldMatrix,
  23. uniform float4x4 viewProjMatrix,
  24. uniform float2 lodMorph,
  25. uniform float4x4 posIndexToObjectSpace,
  26. uniform float baseUVScale,
  27. uniform float4 uvMul_0,
  28. out float4 oPos : POSITION,
  29. out float4 oPosObj : TEXCOORD0
  30. , out float4 oUVMisc : TEXCOORD1 // xy = uv, z = camDepth
  31. , out float4 oUV0 : TEXCOORD2
  32. , out float4 oUV1 : TEXCOORD3
  33. , uniform float4 fogParams
  34. , out float fogVal : COLOR
  35. )
  36. {
  37. float4 pos;
  38. pos = mul(posIndexToObjectSpace, float4(posIndex, height, 1));
  39. float2 uv = float2(posIndex.x * baseUVScale, 1.0 - (posIndex.y * baseUVScale));
  40. float4 worldPos = mul(worldMatrix, pos);
  41. oPosObj = pos;
  42. float toMorph = -min(0, sign(delta.y - lodMorph.y));
  43. worldPos.y += delta.x * toMorph * lodMorph.x;
  44. oUV0.xy = uv.xy * uvMul_0.r;
  45. oUV0.zw = uv.xy * uvMul_0.g;
  46. oUV1.xy = uv.xy * uvMul_0.b;
  47. oUV1.zw = uv.xy * uvMul_0.a;
  48. oPos = mul(viewProjMatrix, worldPos);
  49. oUVMisc.xy = uv.xy;
  50. fogVal = saturate((oPos.z - fogParams.y) * fogParams.w);
  51. }
  52.  
  53. *** ***
  54. *** Terrain Fragment Program: OgreTerrain/3499275481/sm2/fp/hlod ***
  55. float4 expand(float4 v)
  56. {
  57. return v * 2 - 1;
  58. }
  59.  
  60.  
  61. float4 main_fp(
  62. float4 vertexPos : POSITION,
  63. float4 position : TEXCOORD0,
  64. float4 uvMisc : TEXCOORD1,
  65. float4 layerUV0 : TEXCOORD2,
  66. float4 layerUV1 : TEXCOORD3,
  67. uniform float3 fogColour,
  68. float fogVal : COLOR,
  69. uniform float3 ambient,
  70. uniform float4 lightPosObjSpace,
  71. uniform float3 lightDiffuseColour,
  72. uniform float3 lightSpecularColour,
  73. uniform float3 eyePosObjSpace,
  74. uniform float4 scaleBiasSpecular,
  75. uniform sampler2D globalNormal : register(s0)
  76. , uniform sampler2D lightMap : register(s1)
  77. , uniform sampler2D blendTex0 : register(s2)
  78. , uniform sampler2D difftex0 : register(s3)
  79. , uniform sampler2D normtex0 : register(s4)
  80. , uniform sampler2D difftex1 : register(s5)
  81. , uniform sampler2D normtex1 : register(s6)
  82. , uniform sampler2D difftex2 : register(s7)
  83. , uniform sampler2D normtex2 : register(s8)
  84. ) : COLOR
  85. {
  86. float4 outputCol;
  87. float shadow = 1.0;
  88. float2 uv = uvMisc.xy;
  89. outputCol = float4(0,0,0,1);
  90. float3 normal = expand(tex2D(globalNormal, uv)).rgb;
  91. float3 lightDir =
  92. lightPosObjSpace.xyz - (position.xyz * lightPosObjSpace.w);
  93. float3 eyeDir = eyePosObjSpace - position.xyz;
  94. float3 diffuse = float3(0,0,0);
  95. float specular = 0;
  96. float4 blendTexVal0 = tex2D(blendTex0, uv);
  97. float3 tangent = float3(1, 0, 0);
  98. float3 binormal = normalize(cross(tangent, normal));
  99. tangent = normalize(cross(normal, binormal));
  100. float3x3 TBN = float3x3(tangent, binormal, normal);
  101. float4 litRes, litResLayer;
  102. float3 TSlightDir, TSeyeDir, TShalfAngle, TSnormal;
  103. float displacement;
  104. TSlightDir = normalize(mul(TBN, lightDir));
  105. TSeyeDir = normalize(mul(TBN, eyeDir));
  106. float2 uv0 = layerUV0.xy;
  107. displacement = tex2D(normtex0, uv0).a
  108. * scaleBiasSpecular.x + scaleBiasSpecular.y;
  109. uv0 += TSeyeDir.xy * displacement;
  110. TSnormal = expand(tex2D(normtex0, uv0)).rgb;
  111. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  112. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  113. litRes = litResLayer;
  114. float4 diffuseSpecTex0 = tex2D(difftex0, uv0);
  115. diffuse = diffuseSpecTex0.rgb;
  116. specular = diffuseSpecTex0.a;
  117. float2 uv1 = layerUV0.zw;
  118. displacement = tex2D(normtex1, uv1).a
  119. * scaleBiasSpecular.x + scaleBiasSpecular.y;
  120. uv1 += TSeyeDir.xy * displacement;
  121. TSnormal = expand(tex2D(normtex1, uv1)).rgb;
  122. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  123. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  124. litRes = lerp(litRes, litResLayer, blendTexVal0.r);
  125. float4 diffuseSpecTex1 = tex2D(difftex1, uv1);
  126. diffuse = lerp(diffuse, diffuseSpecTex1.rgb, blendTexVal0.r);
  127. specular = lerp(specular, diffuseSpecTex1.a, blendTexVal0.r);
  128. float2 uv2 = layerUV1.xy;
  129. displacement = tex2D(normtex2, uv2).a
  130. * scaleBiasSpecular.x + scaleBiasSpecular.y;
  131. uv2 += TSeyeDir.xy * displacement;
  132. TSnormal = expand(tex2D(normtex2, uv2)).rgb;
  133. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  134. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  135. litRes = lerp(litRes, litResLayer, blendTexVal0.g);
  136. float4 diffuseSpecTex2 = tex2D(difftex2, uv2);
  137. diffuse = lerp(diffuse, diffuseSpecTex2.rgb, blendTexVal0.g);
  138. specular = lerp(specular, diffuseSpecTex2.a, blendTexVal0.g);
  139. shadow = tex2D(lightMap, uv).r;
  140. outputCol.rgb += ambient.rgb * diffuse + litRes.y * lightDiffuseColour * diffuse * shadow;
  141. outputCol.rgb += litRes.z * lightSpecularColour * specular * shadow;
  142. outputCol.rgb = lerp(outputCol.rgb, fogColour, fogVal);
  143. return outputCol;
  144. }
  145.  
  146. *** ***
  147. *** Terrain Vertex Program: OgreTerrain/3499275481/sm2/vp/llod ***
  148. void main_vp(
  149. float2 posIndex : POSITION,
  150. float height : TEXCOORD0,
  151. float2 delta : TEXCOORD1,
  152. uniform float4x4 worldMatrix,
  153. uniform float4x4 viewProjMatrix,
  154. uniform float2 lodMorph,
  155. uniform float4x4 posIndexToObjectSpace,
  156. uniform float baseUVScale,
  157. uniform float4 uvMul_0,
  158. out float4 oPos : POSITION,
  159. out float4 oPosObj : TEXCOORD0
  160. , out float4 oUVMisc : TEXCOORD1 // xy = uv, z = camDepth
  161. , uniform float4 fogParams
  162. , out float fogVal : COLOR
  163. )
  164. {
  165. float4 pos;
  166. pos = mul(posIndexToObjectSpace, float4(posIndex, height, 1));
  167. float2 uv = float2(posIndex.x * baseUVScale, 1.0 - (posIndex.y * baseUVScale));
  168. float4 worldPos = mul(worldMatrix, pos);
  169. oPosObj = pos;
  170. float toMorph = -min(0, sign(delta.y - lodMorph.y));
  171. worldPos.y += delta.x * toMorph * lodMorph.x;
  172. oPos = mul(viewProjMatrix, worldPos);
  173. oUVMisc.xy = uv.xy;
  174. fogVal = saturate((oPos.z - fogParams.y) * fogParams.w);
  175. }
  176.  
  177. *** ***
  178. *** Terrain Fragment Program: OgreTerrain/3499275481/sm2/fp/llod ***
  179. float4 expand(float4 v)
  180. {
  181. return v * 2 - 1;
  182. }
  183.  
  184.  
  185. float4 main_fp(
  186. float4 vertexPos : POSITION,
  187. float4 position : TEXCOORD0,
  188. float4 uvMisc : TEXCOORD1,
  189. uniform float3 fogColour,
  190. float fogVal : COLOR,
  191. uniform float3 ambient,
  192. uniform float4 lightPosObjSpace,
  193. uniform float3 lightDiffuseColour,
  194. uniform float3 lightSpecularColour,
  195. uniform float3 eyePosObjSpace,
  196. uniform float4 scaleBiasSpecular,
  197. uniform sampler2D compositeMap : register(s0)
  198. ) : COLOR
  199. {
  200. float4 outputCol;
  201. float shadow = 1.0;
  202. float2 uv = uvMisc.xy;
  203. outputCol = float4(0,0,0,1);
  204. float3 lightDir =
  205. lightPosObjSpace.xyz - (position.xyz * lightPosObjSpace.w);
  206. float3 eyeDir = eyePosObjSpace - position.xyz;
  207. float3 diffuse = float3(0,0,0);
  208. float specular = 0;
  209. float4 composite = tex2D(compositeMap, uv);
  210. diffuse = composite.rgb;
  211. outputCol.rgb = diffuse;
  212. outputCol.rgb = lerp(outputCol.rgb, fogColour, fogVal);
  213. return outputCol;
  214. }
  215.  
  216. *** ***
  217. WARNING: Texture instance 'OgreTerrain/3499275481/nm' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
  218. WARNING: Texture instance 'OgreTerrain/3499275481/lm' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
  219. WARNING: Texture instance 'TerrBlend1' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
  220. WARNING: Texture instance 'OgreTerrain/3499275481/comp' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
  221. WARNING: Texture instance 'OgreTerrain/3499275481/nm' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
  222. WARNING: Texture instance 'OgreTerrain/3499275481/lm' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
  223. WARNING: Texture instance 'TerrBlend1' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
  224. Texture: dirt_grayrocky_diffusespecular.dds: Loading 1 faces(PF_DXT5,1024x1024x1) with 3 generated mipmaps from Image. Internal format is PF_DXT5,1024x1024x1.
  225. Texture: dirt_grayrocky_normalheight.dds: Loading 1 faces(PF_DXT5,1024x1024x1) with 3 generated mipmaps from Image. Internal format is PF_DXT5,1024x1024x1.
  226. Texture: grass_green-01_diffusespecular.dds: Loading 1 faces(PF_DXT5,1024x1024x1) with 3 generated mipmaps from Image. Internal format is PF_DXT5,1024x1024x1.
  227. Texture: grass_green-01_normalheight.dds: Loading 1 faces(PF_DXT5,1024x1024x1) with 3 generated mipmaps from Image. Internal format is PF_DXT5,1024x1024x1.
  228. Texture: growth_weirdfungus-03_diffusespecular.dds: Loading 1 faces(PF_DXT5,1024x1024x1) with 3 generated mipmaps from Image. Internal format is PF_DXT5,1024x1024x1.
  229. Texture: growth_weirdfungus-03_normalheight.dds: Loading 1 faces(PF_DXT5,1024x1024x1) with 3 generated mipmaps from Image. Internal format is PF_DXT5,1024x1024x1.
  230. WARNING: Texture instance 'OgreTerrain/3499275481/comp' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
  231. *** Terrain Vertex Program: OgreTerrain/3499275481/sm2/vp/comp ***
  232. void main_vp(
  233. float4 pos : POSITION,
  234. float2 uv : TEXCOORD0,
  235. uniform float4x4 worldMatrix,
  236. uniform float4x4 viewProjMatrix,
  237. uniform float2 lodMorph,
  238. uniform float4 uvMul_0,
  239. out float4 oPos : POSITION,
  240. out float4 oPosObj : TEXCOORD0
  241. , out float4 oUVMisc : TEXCOORD1 // xy = uv, z = camDepth
  242. , out float4 oUV0 : TEXCOORD2
  243. , out float4 oUV1 : TEXCOORD3
  244. )
  245. {
  246. float4 worldPos = mul(worldMatrix, pos);
  247. oPosObj = pos;
  248. oUV0.xy = uv.xy * uvMul_0.r;
  249. oUV0.zw = uv.xy * uvMul_0.g;
  250. oUV1.xy = uv.xy * uvMul_0.b;
  251. oUV1.zw = uv.xy * uvMul_0.a;
  252. oPos = mul(viewProjMatrix, worldPos);
  253. oUVMisc.xy = uv.xy;
  254. }
  255.  
  256. *** ***
  257. *** Terrain Fragment Program: OgreTerrain/3499275481/sm2/fp/comp ***
  258. float4 expand(float4 v)
  259. {
  260. return v * 2 - 1;
  261. }
  262.  
  263.  
  264. float4 main_fp(
  265. float4 vertexPos : POSITION,
  266. float4 position : TEXCOORD0,
  267. float4 uvMisc : TEXCOORD1,
  268. float4 layerUV0 : TEXCOORD2,
  269. float4 layerUV1 : TEXCOORD3,
  270. uniform float3 ambient,
  271. uniform float4 lightPosObjSpace,
  272. uniform float3 lightDiffuseColour,
  273. uniform float3 lightSpecularColour,
  274. uniform float3 eyePosObjSpace,
  275. uniform float4 scaleBiasSpecular,
  276. uniform sampler2D globalNormal : register(s0)
  277. , uniform sampler2D lightMap : register(s1)
  278. , uniform sampler2D blendTex0 : register(s2)
  279. , uniform sampler2D difftex0 : register(s3)
  280. , uniform sampler2D normtex0 : register(s4)
  281. , uniform sampler2D difftex1 : register(s5)
  282. , uniform sampler2D normtex1 : register(s6)
  283. , uniform sampler2D difftex2 : register(s7)
  284. , uniform sampler2D normtex2 : register(s8)
  285. ) : COLOR
  286. {
  287. float4 outputCol;
  288. float shadow = 1.0;
  289. float2 uv = uvMisc.xy;
  290. outputCol = float4(0,0,0,1);
  291. float3 normal = expand(tex2D(globalNormal, uv)).rgb;
  292. float3 lightDir =
  293. lightPosObjSpace.xyz - (position.xyz * lightPosObjSpace.w);
  294. float3 eyeDir = eyePosObjSpace - position.xyz;
  295. float3 diffuse = float3(0,0,0);
  296. float specular = 0;
  297. float4 blendTexVal0 = tex2D(blendTex0, uv);
  298. float3 tangent = float3(1, 0, 0);
  299. float3 binormal = normalize(cross(tangent, normal));
  300. tangent = normalize(cross(normal, binormal));
  301. float3x3 TBN = float3x3(tangent, binormal, normal);
  302. float4 litRes, litResLayer;
  303. float3 TSlightDir, TSeyeDir, TShalfAngle, TSnormal;
  304. float displacement;
  305. TSlightDir = normalize(mul(TBN, lightDir));
  306. TSeyeDir = normalize(mul(TBN, eyeDir));
  307. float2 uv0 = layerUV0.xy;
  308. TSnormal = expand(tex2D(normtex0, uv0)).rgb;
  309. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  310. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  311. litRes = litResLayer;
  312. float4 diffuseSpecTex0 = tex2D(difftex0, uv0);
  313. diffuse = diffuseSpecTex0.rgb;
  314. specular = diffuseSpecTex0.a;
  315. float2 uv1 = layerUV0.zw;
  316. TSnormal = expand(tex2D(normtex1, uv1)).rgb;
  317. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  318. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  319. litRes = lerp(litRes, litResLayer, blendTexVal0.r);
  320. float4 diffuseSpecTex1 = tex2D(difftex1, uv1);
  321. diffuse = lerp(diffuse, diffuseSpecTex1.rgb, blendTexVal0.r);
  322. specular = lerp(specular, diffuseSpecTex1.a, blendTexVal0.r);
  323. float2 uv2 = layerUV1.xy;
  324. TSnormal = expand(tex2D(normtex2, uv2)).rgb;
  325. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  326. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  327. litRes = lerp(litRes, litResLayer, blendTexVal0.g);
  328. float4 diffuseSpecTex2 = tex2D(difftex2, uv2);
  329. diffuse = lerp(diffuse, diffuseSpecTex2.rgb, blendTexVal0.g);
  330. specular = lerp(specular, diffuseSpecTex2.a, blendTexVal0.g);
  331. shadow = tex2D(lightMap, uv).r;
  332. outputCol.rgb += ambient.rgb * diffuse + litRes.y * lightDiffuseColour * diffuse * shadow;
  333. outputCol.a = shadow;
  334. return outputCol;
  335. }
  336.  
  337. *** ***
  338. Creating viewport on target 'rtt/346282960/0/SceneManagerInstance2/compRTT', rendering from camera 'cam', relative dimensions 8192L: 0 T: 0 W: 1 H: 1 ZOrder: 0
  339. Viewport for camera 'cam', actual dimensions 8192L: 0 T: 0 W: 1024 H: 1024
  340. DefaultWorkQueueBase('Root') - QUEUED(thread:3024): ID=4 channel=3 requestType=2
  341. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_START(3024): ID=4 channel=3 requestType=2
  342. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_END(3024): ID=4 channel=3 requestType=2 processed=1
  343. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_START(thread:3024): ID=4 success=1 messages=[] channel=3 requestType=2
  344. *** Terrain Vertex Program: OgreTerrain/3499275481/sm2/vp/hlod ***
  345. void main_vp(
  346. float2 posIndex : POSITION,
  347. float height : TEXCOORD0,
  348. float2 delta : TEXCOORD1,
  349. uniform float4x4 worldMatrix,
  350. uniform float4x4 viewProjMatrix,
  351. uniform float2 lodMorph,
  352. uniform float4x4 posIndexToObjectSpace,
  353. uniform float baseUVScale,
  354. uniform float4 uvMul_0,
  355. out float4 oPos : POSITION,
  356. out float4 oPosObj : TEXCOORD0
  357. , out float4 oUVMisc : TEXCOORD1 // xy = uv, z = camDepth
  358. , out float4 oUV0 : TEXCOORD2
  359. , out float4 oUV1 : TEXCOORD3
  360. , uniform float4 fogParams
  361. , out float fogVal : COLOR
  362. )
  363. {
  364. float4 pos;
  365. pos = mul(posIndexToObjectSpace, float4(posIndex, height, 1));
  366. float2 uv = float2(posIndex.x * baseUVScale, 1.0 - (posIndex.y * baseUVScale));
  367. float4 worldPos = mul(worldMatrix, pos);
  368. oPosObj = pos;
  369. float toMorph = -min(0, sign(delta.y - lodMorph.y));
  370. worldPos.y += delta.x * toMorph * lodMorph.x;
  371. oUV0.xy = uv.xy * uvMul_0.r;
  372. oUV0.zw = uv.xy * uvMul_0.g;
  373. oUV1.xy = uv.xy * uvMul_0.b;
  374. oUV1.zw = uv.xy * uvMul_0.a;
  375. oPos = mul(viewProjMatrix, worldPos);
  376. oUVMisc.xy = uv.xy;
  377. fogVal = saturate((oPos.z - fogParams.y) * fogParams.w);
  378. }
  379.  
  380. *** ***
  381. *** Terrain Fragment Program: OgreTerrain/3499275481/sm2/fp/hlod ***
  382. float4 expand(float4 v)
  383. {
  384. return v * 2 - 1;
  385. }
  386.  
  387.  
  388. float4 main_fp(
  389. float4 vertexPos : POSITION,
  390. float4 position : TEXCOORD0,
  391. float4 uvMisc : TEXCOORD1,
  392. float4 layerUV0 : TEXCOORD2,
  393. float4 layerUV1 : TEXCOORD3,
  394. uniform float3 fogColour,
  395. float fogVal : COLOR,
  396. uniform float3 ambient,
  397. uniform float4 lightPosObjSpace,
  398. uniform float3 lightDiffuseColour,
  399. uniform float3 lightSpecularColour,
  400. uniform float3 eyePosObjSpace,
  401. uniform float4 scaleBiasSpecular,
  402. uniform sampler2D globalNormal : register(s0)
  403. , uniform sampler2D lightMap : register(s1)
  404. , uniform sampler2D blendTex0 : register(s2)
  405. , uniform sampler2D difftex0 : register(s3)
  406. , uniform sampler2D normtex0 : register(s4)
  407. , uniform sampler2D difftex1 : register(s5)
  408. , uniform sampler2D normtex1 : register(s6)
  409. , uniform sampler2D difftex2 : register(s7)
  410. , uniform sampler2D normtex2 : register(s8)
  411. ) : COLOR
  412. {
  413. float4 outputCol;
  414. float shadow = 1.0;
  415. float2 uv = uvMisc.xy;
  416. outputCol = float4(0,0,0,1);
  417. float3 normal = expand(tex2D(globalNormal, uv)).rgb;
  418. float3 lightDir =
  419. lightPosObjSpace.xyz - (position.xyz * lightPosObjSpace.w);
  420. float3 eyeDir = eyePosObjSpace - position.xyz;
  421. float3 diffuse = float3(0,0,0);
  422. float specular = 0;
  423. float4 blendTexVal0 = tex2D(blendTex0, uv);
  424. float3 tangent = float3(1, 0, 0);
  425. float3 binormal = normalize(cross(tangent, normal));
  426. tangent = normalize(cross(normal, binormal));
  427. float3x3 TBN = float3x3(tangent, binormal, normal);
  428. float4 litRes, litResLayer;
  429. float3 TSlightDir, TSeyeDir, TShalfAngle, TSnormal;
  430. float displacement;
  431. TSlightDir = normalize(mul(TBN, lightDir));
  432. TSeyeDir = normalize(mul(TBN, eyeDir));
  433. float2 uv0 = layerUV0.xy;
  434. displacement = tex2D(normtex0, uv0).a
  435. * scaleBiasSpecular.x + scaleBiasSpecular.y;
  436. uv0 += TSeyeDir.xy * displacement;
  437. TSnormal = expand(tex2D(normtex0, uv0)).rgb;
  438. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  439. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  440. litRes = litResLayer;
  441. float4 diffuseSpecTex0 = tex2D(difftex0, uv0);
  442. diffuse = diffuseSpecTex0.rgb;
  443. specular = diffuseSpecTex0.a;
  444. float2 uv1 = layerUV0.zw;
  445. displacement = tex2D(normtex1, uv1).a
  446. * scaleBiasSpecular.x + scaleBiasSpecular.y;
  447. uv1 += TSeyeDir.xy * displacement;
  448. TSnormal = expand(tex2D(normtex1, uv1)).rgb;
  449. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  450. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  451. litRes = lerp(litRes, litResLayer, blendTexVal0.r);
  452. float4 diffuseSpecTex1 = tex2D(difftex1, uv1);
  453. diffuse = lerp(diffuse, diffuseSpecTex1.rgb, blendTexVal0.r);
  454. specular = lerp(specular, diffuseSpecTex1.a, blendTexVal0.r);
  455. float2 uv2 = layerUV1.xy;
  456. displacement = tex2D(normtex2, uv2).a
  457. * scaleBiasSpecular.x + scaleBiasSpecular.y;
  458. uv2 += TSeyeDir.xy * displacement;
  459. TSnormal = expand(tex2D(normtex2, uv2)).rgb;
  460. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  461. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  462. litRes = lerp(litRes, litResLayer, blendTexVal0.g);
  463. float4 diffuseSpecTex2 = tex2D(difftex2, uv2);
  464. diffuse = lerp(diffuse, diffuseSpecTex2.rgb, blendTexVal0.g);
  465. specular = lerp(specular, diffuseSpecTex2.a, blendTexVal0.g);
  466. shadow = tex2D(lightMap, uv).r;
  467. outputCol.rgb += ambient.rgb * diffuse + litRes.y * lightDiffuseColour * diffuse * shadow;
  468. outputCol.rgb += litRes.z * lightSpecularColour * specular * shadow;
  469. outputCol.rgb = lerp(outputCol.rgb, fogColour, fogVal);
  470. return outputCol;
  471. }
  472.  
  473. *** ***
  474. *** Terrain Vertex Program: OgreTerrain/3499275481/sm2/vp/llod ***
  475. void main_vp(
  476. float2 posIndex : POSITION,
  477. float height : TEXCOORD0,
  478. float2 delta : TEXCOORD1,
  479. uniform float4x4 worldMatrix,
  480. uniform float4x4 viewProjMatrix,
  481. uniform float2 lodMorph,
  482. uniform float4x4 posIndexToObjectSpace,
  483. uniform float baseUVScale,
  484. uniform float4 uvMul_0,
  485. out float4 oPos : POSITION,
  486. out float4 oPosObj : TEXCOORD0
  487. , out float4 oUVMisc : TEXCOORD1 // xy = uv, z = camDepth
  488. , uniform float4 fogParams
  489. , out float fogVal : COLOR
  490. )
  491. {
  492. float4 pos;
  493. pos = mul(posIndexToObjectSpace, float4(posIndex, height, 1));
  494. float2 uv = float2(posIndex.x * baseUVScale, 1.0 - (posIndex.y * baseUVScale));
  495. float4 worldPos = mul(worldMatrix, pos);
  496. oPosObj = pos;
  497. float toMorph = -min(0, sign(delta.y - lodMorph.y));
  498. worldPos.y += delta.x * toMorph * lodMorph.x;
  499. oPos = mul(viewProjMatrix, worldPos);
  500. oUVMisc.xy = uv.xy;
  501. fogVal = saturate((oPos.z - fogParams.y) * fogParams.w);
  502. }
  503.  
  504. *** ***
  505. *** Terrain Fragment Program: OgreTerrain/3499275481/sm2/fp/llod ***
  506. float4 expand(float4 v)
  507. {
  508. return v * 2 - 1;
  509. }
  510.  
  511.  
  512. float4 main_fp(
  513. float4 vertexPos : POSITION,
  514. float4 position : TEXCOORD0,
  515. float4 uvMisc : TEXCOORD1,
  516. uniform float3 fogColour,
  517. float fogVal : COLOR,
  518. uniform float3 ambient,
  519. uniform float4 lightPosObjSpace,
  520. uniform float3 lightDiffuseColour,
  521. uniform float3 lightSpecularColour,
  522. uniform float3 eyePosObjSpace,
  523. uniform float4 scaleBiasSpecular,
  524. uniform sampler2D compositeMap : register(s0)
  525. ) : COLOR
  526. {
  527. float4 outputCol;
  528. float shadow = 1.0;
  529. float2 uv = uvMisc.xy;
  530. outputCol = float4(0,0,0,1);
  531. float3 lightDir =
  532. lightPosObjSpace.xyz - (position.xyz * lightPosObjSpace.w);
  533. float3 eyeDir = eyePosObjSpace - position.xyz;
  534. float3 diffuse = float3(0,0,0);
  535. float specular = 0;
  536. float4 composite = tex2D(compositeMap, uv);
  537. diffuse = composite.rgb;
  538. outputCol.rgb = diffuse;
  539. outputCol.rgb = lerp(outputCol.rgb, fogColour, fogVal);
  540. return outputCol;
  541. }
  542.  
  543. *** ***
  544. DefaultWorkQueueBase('Root') - QUEUED(thread:3024): ID=5 channel=3 requestType=2
  545. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_START(3024): ID=5 channel=3 requestType=2
  546. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_END(3024): ID=5 channel=3 requestType=2 processed=1
  547. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_START(thread:3024): ID=5 success=1 messages=[] channel=3 requestType=2
  548. DefaultWorkQueueBase('Root') - QUEUED(thread:3024): ID=6 channel=3 requestType=2
  549. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_END(thread:3024): ID=5 success=1 messages=[] channel=3 requestType=2
  550. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_END(thread:3024): ID=4 success=1 messages=[] channel=3 requestType=2
  551. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_END(thread:3024): ID=1 success=1 messages=[] channel=2 requestType=1
  552. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_START(2e6c): ID=3 channel=3 requestType=1
  553. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_START(2a30): ID=6 channel=3 requestType=2
  554. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_END(2a30): ID=6 channel=3 requestType=2 processed=1
  555. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_END(2e6c): ID=3 channel=3 requestType=1 processed=1
  556. Mesh: Loading tudorhouse.mesh.
  557. Texture: fw12b.jpg: Loading 1 faces(PF_R8G8B8,1024x1024x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,1024x1024x1.
  558. Texture: cloudy_noon_fr.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,512x512x1.
  559. Texture: cloudy_noon_bk.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,512x512x1.
  560. Texture: cloudy_noon_lf.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,512x512x1.
  561. Texture: cloudy_noon_rt.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,512x512x1.
  562. Texture: cloudy_noon_up.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,512x512x1.
  563. Texture: cloudy_noon_dn.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,512x512x1.
  564. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_START(thread:3024): ID=6 success=1 messages=[] channel=3 requestType=2
  565. *** Terrain Vertex Program: OgreTerrain/3499275481/sm2/vp/comp ***
  566. void main_vp(
  567. float4 pos : POSITION,
  568. float2 uv : TEXCOORD0,
  569. uniform float4x4 worldMatrix,
  570. uniform float4x4 viewProjMatrix,
  571. uniform float2 lodMorph,
  572. uniform float4 uvMul_0,
  573. out float4 oPos : POSITION,
  574. out float4 oPosObj : TEXCOORD0
  575. , out float4 oUVMisc : TEXCOORD1 // xy = uv, z = camDepth
  576. , out float4 oUV0 : TEXCOORD2
  577. , out float4 oUV1 : TEXCOORD3
  578. )
  579. {
  580. float4 worldPos = mul(worldMatrix, pos);
  581. oPosObj = pos;
  582. oUV0.xy = uv.xy * uvMul_0.r;
  583. oUV0.zw = uv.xy * uvMul_0.g;
  584. oUV1.xy = uv.xy * uvMul_0.b;
  585. oUV1.zw = uv.xy * uvMul_0.a;
  586. oPos = mul(viewProjMatrix, worldPos);
  587. oUVMisc.xy = uv.xy;
  588. }
  589.  
  590. *** ***
  591. *** Terrain Fragment Program: OgreTerrain/3499275481/sm2/fp/comp ***
  592. float4 expand(float4 v)
  593. {
  594. return v * 2 - 1;
  595. }
  596.  
  597.  
  598. float4 main_fp(
  599. float4 vertexPos : POSITION,
  600. float4 position : TEXCOORD0,
  601. float4 uvMisc : TEXCOORD1,
  602. float4 layerUV0 : TEXCOORD2,
  603. float4 layerUV1 : TEXCOORD3,
  604. uniform float3 ambient,
  605. uniform float4 lightPosObjSpace,
  606. uniform float3 lightDiffuseColour,
  607. uniform float3 lightSpecularColour,
  608. uniform float3 eyePosObjSpace,
  609. uniform float4 scaleBiasSpecular,
  610. uniform sampler2D globalNormal : register(s0)
  611. , uniform sampler2D lightMap : register(s1)
  612. , uniform sampler2D blendTex0 : register(s2)
  613. , uniform sampler2D difftex0 : register(s3)
  614. , uniform sampler2D normtex0 : register(s4)
  615. , uniform sampler2D difftex1 : register(s5)
  616. , uniform sampler2D normtex1 : register(s6)
  617. , uniform sampler2D difftex2 : register(s7)
  618. , uniform sampler2D normtex2 : register(s8)
  619. ) : COLOR
  620. {
  621. float4 outputCol;
  622. float shadow = 1.0;
  623. float2 uv = uvMisc.xy;
  624. outputCol = float4(0,0,0,1);
  625. float3 normal = expand(tex2D(globalNormal, uv)).rgb;
  626. float3 lightDir =
  627. lightPosObjSpace.xyz - (position.xyz * lightPosObjSpace.w);
  628. float3 eyeDir = eyePosObjSpace - position.xyz;
  629. float3 diffuse = float3(0,0,0);
  630. float specular = 0;
  631. float4 blendTexVal0 = tex2D(blendTex0, uv);
  632. float3 tangent = float3(1, 0, 0);
  633. float3 binormal = normalize(cross(tangent, normal));
  634. tangent = normalize(cross(normal, binormal));
  635. float3x3 TBN = float3x3(tangent, binormal, normal);
  636. float4 litRes, litResLayer;
  637. float3 TSlightDir, TSeyeDir, TShalfAngle, TSnormal;
  638. float displacement;
  639. TSlightDir = normalize(mul(TBN, lightDir));
  640. TSeyeDir = normalize(mul(TBN, eyeDir));
  641. float2 uv0 = layerUV0.xy;
  642. TSnormal = expand(tex2D(normtex0, uv0)).rgb;
  643. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  644. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  645. litRes = litResLayer;
  646. float4 diffuseSpecTex0 = tex2D(difftex0, uv0);
  647. diffuse = diffuseSpecTex0.rgb;
  648. specular = diffuseSpecTex0.a;
  649. float2 uv1 = layerUV0.zw;
  650. TSnormal = expand(tex2D(normtex1, uv1)).rgb;
  651. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  652. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  653. litRes = lerp(litRes, litResLayer, blendTexVal0.r);
  654. float4 diffuseSpecTex1 = tex2D(difftex1, uv1);
  655. diffuse = lerp(diffuse, diffuseSpecTex1.rgb, blendTexVal0.r);
  656. specular = lerp(specular, diffuseSpecTex1.a, blendTexVal0.r);
  657. float2 uv2 = layerUV1.xy;
  658. TSnormal = expand(tex2D(normtex2, uv2)).rgb;
  659. TShalfAngle = normalize(TSlightDir + TSeyeDir);
  660. litResLayer = lit(dot(TSlightDir, TSnormal), dot(TShalfAngle, TSnormal), scaleBiasSpecular.z);
  661. litRes = lerp(litRes, litResLayer, blendTexVal0.g);
  662. float4 diffuseSpecTex2 = tex2D(difftex2, uv2);
  663. diffuse = lerp(diffuse, diffuseSpecTex2.rgb, blendTexVal0.g);
  664. specular = lerp(specular, diffuseSpecTex2.a, blendTexVal0.g);
  665. shadow = tex2D(lightMap, uv).r;
  666. outputCol.rgb += ambient.rgb * diffuse + litRes.y * lightDiffuseColour * diffuse * shadow;
  667. outputCol.a = shadow;
  668. return outputCol;
  669. }
  670.  
  671. *** ***
  672. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_END(thread:3024): ID=6 success=1 messages=[] channel=3 requestType=2
  673. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_START(thread:3024): ID=3 success=1 messages=[] channel=3 requestType=1
  674. DefaultWorkQueueBase('Root') - QUEUED(thread:3024): ID=7 channel=3 requestType=1
  675. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_END(thread:3024): ID=3 success=1 messages=[] channel=3 requestType=1
  676. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_START(2e6c): ID=7 channel=3 requestType=1
  677. DefaultWorkQueueBase('Root') - PROCESS_REQUEST_END(2e6c): ID=7 channel=3 requestType=1 processed=1
  678. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_START(thread:3024): ID=7 success=1 messages=[] channel=3 requestType=1
  679. DefaultWorkQueueBase('Root') - PROCESS_RESPONSE_END(thread:3024): ID=7 success=1 messages=[] channel=3 requestType=1
  680. First-chance exception at 0x000007FEFD659E5D in SampleBrowser_d.exe: Microsoft C++ exception: Ogre::ItemIdentityException at memory location 0x0000000000A5E3B0.
  681. First-chance exception at 0x000007FEFD659E5D in SampleBrowser_d.exe: Microsoft C++ exception: Ogre::ItemIdentityException at memory location 0x0000000000A5E3B0.
  682. The thread 0x2c64 has exited with code 0 (0x0).
  683. The thread 0x32d4 has exited with code 0 (0x0).
  684. The thread 0x25e8 has exited with code 0 (0x0).
  685. Writing shader cache to
  686. C:\Users\CDS2012\Documents\Ogre\Ghadamon\cache_d.bin
  687. Render Target 'rtt/346282960/0/SceneManagerInstance2/compRTT' Average FPS: 0.479331 Best FPS: 0.938967 Worst FPS: 0.0196951
  688. The thread 0x1dc4 has exited with code 0 (0x0).
  689. Texture: fw12b.jpg: Loading 1 faces(PF_R8G8B8,1024x1024x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,1024x1024x1.
  690. Texture: egyptrockyfull.jpg: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,512x512x1.
  691. Texture: rockwall.tga: Loading 1 faces(PF_R8G8B8,256x256x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,256x256x1.
  692. Texture: ogrelogo.png: Loading 1 faces(PF_R8G8B8,1024x1024x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,1024x1024x1.
  693. Texture: Panels_Diffuse.png: Loading 1 faces(PF_R8G8B8,512x512x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,512x512x1.
  694. Texture: sdk_button_down.png: Loading 1 faces(PF_A8R8G8B8,128x32x1) with 5 generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x32x1.
  695. Texture: sdk_button_over.png: Loading 1 faces(PF_A8R8G8B8,128x32x1) with 5 generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x32x1.
  696. Texture: thumb_volumecsg.png: Loading 1 faces(PF_R8G8B8,128x128x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,128x128x1.
  697. Texture: thumb_volumeterrain.png: Loading 1 faces(PF_R8G8B8,128x128x1) with 5 generated mipmaps from Image. Internal format is PF_A8B8G8R8,128x128x1.
  698. Texture: thumb_voltex.png: Loading 1 faces(PF_A8R8G8B8,128x128x1) with 5 generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x128x1.
  699. Texture: thumb_water.png: Loading 1 faces(PF_A8R8G8B8,128x128x1) with 5 generated mipmaps from Image. Internal format is PF_A8R8G8B8,128x128x1.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×