RYHPT-74611’NÂ.7Q*-7 VðAyLq7��ˆ'^P0"2@8000T IT kH Xp0› 00M0f0“0Éh0£ 0{0¨0Ã0Z$ ²  0Æ0Ð0à 0í @þ(03(0 ! P0F0)0Ü0‘0 @0W0}0©B€0§$€0�ö& F+0~+0£+0Ê0ñ+00F&0À0a1À0} 00m0ì4€0_B€0u6€0ÃB€0Ú00Ž: 0Ä0žA�0  “4 ¥( ¿  Ö ñ ôDx0200FG˜0^B˜0s0� 0Ÿ0µ0å0ÍN˜0ÕO˜0ïS00àQ�0ÿR�0S80 (0)U˜0<V˜0`S00LuY0z8‚@ŽH L³PÊØßó  , ? S $k („ ,œ 0­ 4Á 8Ñ <ì @  D# 8 T Ya Y`p �  — 0´ @Æ Pß hï l        "   $ / C ([ 8t @š P `á b  !  (  (  :  Ø  „  ? k ' 7 #I U _ Yf Yn U' t  • ¡ ­ µ ½ Å Ï  ß í ù    *! +/ )(F ,8R H  -  .  D  Yh ~ – ® Æ Þ /ç 0( 8$  <  RIRØk r`‚Z‚]Œœ&«‚a_ YŒÀËß;RØëH0�óEÀ  Eà )E EE  `E@ }E` œE€ »E  ÙSé2ûB @?   30YC SYh$zY�(¡Yµ,ÆF  4ÛìýK( J,4I`"ˆ/ E \M i u 0„ 0Ž œ¬½LÇL$Ð 0Ù 0â ø & 6 D V $l 0z 0� 0› 0§ ³ 0¼ 0Æ 0Î 0Ü 0ë 0øP.(C,_p  _ YÀo ß;|‡�Wx�@ ¡Yo ¬¼ÈÔX  VÞ ç(ï,ç(ï,ø0   $2 Ø(PCharPContextSwitchPInt32PLightTypePRenderDataTypePSceneRenderPassTypePShadowCasterTypePTextureFormatBasePUInt16PUInt32PUInt8boolfloatCD3D11_BLEND_DESCCD3D11_DEPTH_STENCIL_DESCCD3D11_RASTERIZER_DESCD3D11_DEPTH_STENCILOP_DESCD3D11_RENDER_TARGET_BLEND_DESCPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPAssetReferencePBasePClassDescriptorPClusterHeaderPClusterHeaderBasePClusterHeaderD3D11PContextVariantFoldingTablePEffectPEffectVariantPInstanceListHeaderPMaterialPMaterialSwitchPNodeContextPParameterBufferPParameterBufferBasePSamplerStatePSamplerStateBasePSamplerStateD3D11PSceneRenderPassPShaderPShaderComputeProgramPShaderComputeProgramD3D11PShaderFragmentProgramPShaderFragmentProgramD3D11PShaderGeometryProgramPShaderGeometryProgramD3D11PShaderParameterCaptureBufferLocationPShaderParameterCaptureBufferLocationSizePShaderParameterCaptureBufferLocationTypeConstantBufferPShaderParameterCaptureBufferSamplerPShaderParameterCaptureBufferTexture2DPShaderParameterCaptureBufferTexture3DPShaderParameterCaptureBufferTextureBasePShaderParameterCaptureBufferTextureCubeMapPShaderParameterDefinitionPShaderPassPShaderPassBasePShaderPassD3D11PShaderPassInfoPShaderPassParameterLocationTypesBasePShaderPassParameterLocationTypesConstantBufferPShaderPassStateBasePShaderPassStateD3D11PShaderProgramBasePShaderProgramD3D11PShaderStreamDefinitionPShaderVertexProgramPShaderVertexProgramD3D11PSharrayPStreamInputDescD3D11PStreamInputLayoutD3D11PStringPTexture2DPTexture2DBasePTexture2DD3D11PTexture3DPTexture3DBasePTexture3DD3D11PTextureCommonBasePTextureCubeMapPTextureCubeMapBasePTextureCubeMapD3D11m_idm_assetm_assetTypem_indexBufferSizem_vertexBufferSizem_maxTextureBufferSizem_phyreMarkerm_sizem_instanceListCountm_packedNamespaceSizem_arrayFixupSizem_arrayFixupCountm_pointerFixupSizem_pointerFixupCountm_pointerArrayFixupSizem_pointerArrayFixupCountm_pointersInArraysCountm_userFixupCountm_userFixupDataSizem_totalDataSizem_headerClassInstanceCountm_headerClassChildCountm_platformIDm_physicsEngineIDm_supportedLightMaskm_supportedShadowCasterMaskm_effectFilem_effectSourcem_effectVariantsm_supportedLightTypesm_supportedShadowCasterTypesm_contextSwitchesm_contextVariantSwitchesm_maxLightCountm_numSupportedShaderLODLevelsm_countm_elsm_effectm_switchesm_sceneRenderPassesm_sceneRenderPassLookupm_largestShaderPassCountm_tweakableShaderParameterDefinitionsm_untweakableShaderParameterDefinitionsm_tweakableParameterBufferSizem_untweakableParameterBufferSizem_classIDm_objectsSizem_arraysSizem_effectVariantm_parameterBufferm_remapFromm_remapTom_namem_valuem_packedSwitchesm_parameterBufferSizem_minFilterm_magFilterm_wrapSm_wrapTm_wrapRm_lodBiasm_maxAnisotropym_borderColorm_baseLevelm_maxLevelm_flagsm_passTypem_shadersm_entryPointsm_variantsFoldingTablem_platformsm_platformsAreIncludem_contextVariantIndexm_contextVariantVpIndexm_contextVariantFpIndexm_contextVariantGsIndexm_contextVariantCsIndexm_passesm_parameterDefinitionsForPassesm_streamDefinitionsForPassesm_parameterBufferFrequenciesRequiredm_offsetm_constantBufferLocationm_typem_unusedPointerm_texturem_parameterTypem_samplerStatem_textureBufferIndexm_dataTypem_arrayElementCountm_bufferLocm_statem_vertexParameterLocationm_fragmentParameterLocationm_geometryParameterLocationm_computeParameterLocationm_vertexTexParameterLocationm_fragmentTexParameterLocationm_geometryTexParameterLocationm_computeTexParameterLocationm_vertexProgramm_fragmentProgramm_geometryProgramm_computeProgramm_streamLocationsm_vertexEntryPointm_vertexProfilem_fragmentEntryPointm_fragmentProfilem_geometryEntryPointm_geometryProfilem_computeEntryPointm_computeProfilem_parameterLocationsm_parameterStartm_parameterCountm_rasterDescm_depthDescm_blendDescm_stencilRefAlphaToCoverageEnableIndependentBlendEnableRenderTargetDepthEnableDepthWriteMaskDepthFuncStencilEnableStencilReadMaskStencilWriteMaskFrontFaceBackFaceFillModeCullModeFrontCounterClockwiseDepthBiasDepthBiasClampSlopeScaledDepthBiasDepthClipEnableScissorEnableMultisampleEnableAntialiasedLineEnableStencilFailOpStencilDepthFailOpStencilPassOpStencilFuncBlendEnableSrcBlendDestBlendBlendOpSrcBlendAlphaDestBlendAlphaBlendOpAlphaRenderTargetWriteMaskm_importantStatem_compiledCodem_constantBufferSizem_globalConstantBufferIndexm_shaderProfilem_renderTypem_nameHashm_indexm_inputLayoutm_um_semanticm_semanticIndexm_d3dFormatm_inputSlotm_streamsm_bufferm_widthm_heightm_depthm_formatm_memoryTypem_mipmapCountm_maxMipLevelm_textureFlagsH ¨xp hh ÀpP@< @@PP!@@%Ø€X & 'dD@-.ˆP8./ÀÀ7P0 E x(FݘpÕIÁ !Data/Shaders/S_Mesh_vs__Mesh_fs__50025.cgfx#4D9173D70D7039A57951D030AEDA147D#materialData/Shaders/S_Mesh_vs__Mesh_fs__50025.fx#4D9173D70D7039A57951D030AEDA147D #line 1 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #define D_PLATFORM_D3D11x64 #define EDGE_DETAIL #define SAND_SIDE #define UV_OFFSET #define SPECULAR #define SAND_FANCY #define SHADOW_MAP #define DITHER_OUT // Automatically generated. Do not edit. // =======================================================================================================================[COMMON DEFINES]=== #define PHYRE3X_ENABLED #if !defined(D_PLATFORM_GXM) #define h2tex3D tex3D #define h4tex2D tex2D #define h3tex2D tex2D #define h2tex2D tex2D #define h1tex2D tex2D #define h4texCUBE texCUBE #define h3texCUBE texCUBE #endif // ========================================================================================================================[COMMON STATES]=== #if !defined(D_PLATFORM_GXM) BlendState ourBlendState { BlendEnable[0] = FALSE; BlendEnable[1] = FALSE; SrcBlend[0] = Src_Alpha; DestBlend[0] = Inv_Src_Alpha; BlendOp[0] = ADD; SrcBlendAlpha[0] = ONE; DestBlendAlpha[0] = ONE; BlendOpAlpha[0] = ADD; RenderTargetWriteMask[0] = 15; AlphaToCoverageEnable = false; }; DepthStencilState ourDepthStencilState { DepthEnable=true; DepthFunc=less; StencilEnable=false; }; RasterizerState ourRasterState { CullMode=None; DepthBias=0.0f; ScissorEnable=false; MultiSampleEnable=false; DepthClipEnable=false; AntialiasedLineEnable=false; }; #endif // ==================================================================================================================[VERTEX SHADER BEGIN]=== #define main Opaque_vs_main #define IN Opaque_vs_IN #define OUT Opaque_vs_OUT #define v2f Opaque_vs_v2f #define a2v Opaque_vs_a2v // ------------------------------------------------------------------------------------------------------------------------------------------ #define GLOBAL_LEAN_AND_MEAN #line 1 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #ifndef MIGRATORY_SH #define MIGRATORY_SH //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef D_PLATFORM_D3D11x64 #define D_PLATFORM_D3D11 #endif #ifdef D_PLATFORM_D3D11 //#pragma pack_matrix(column_major) #define D_D3D11_OTHER(x,y) x #define D_D3D11_ONLY(x) x #define POSITION_OUT SV_POSITION #define FINAL_COLOR D_D3D11_OTHER(SV_TARGET0,COLOR) #elif defined(D_PLATFORM_GNM) #ifdef __ORBIS__ #pragma warning (disable:5203) // parameter unreferenced #pragma warning (disable:5206) // local variable unreferenced #pragma warning (disable:6204) // does not support uniform default values #pragma warning (disable:6459) // __user_defined__ is not a valid semantic for uniform #pragma warning (disable:5581) // PSSL treats 'half' type as 'float' #pragma warning (disable:5609) // PSSL treats 'half' type as 'float' #pragma warning (disable:5583) // PSSL treats 'half' literals as 'float' #pragma warning (disable:5524) // unsupported compiler hint //! Some evil #defines to sort out matrix multiplies. #define float4x4 row_major float4x4 #define float3x4 row_major float3x4 #define float4x3 row_major float4x3 //! Semantics for VS/PS inputs and outputs. #define POSITION S_POSITION #define SV_POSITION S_POSITION #define SV_GroupID S_GROUP_ID #define SV_VertexID S_VERTEX_ID #define SV_DispatchThreadID S_DISPATCH_THREAD_ID #define SV_GroupThreadID S_GROUP_THREAD_ID #define SV_GroupIndex S_GROUP_INDEX #define SV_PRIMITIVEID S_PRIMITIVE_ID #define SV_IsFrontFace S_FRONT_FACE #define SV_Depth FRAG_OUTPUT_DEPTH #define FRAG_OUTPUT_COLOR S_TARGET_OUTPUT0 #define FRAG_OUTPUT_COLOR0 S_TARGET_OUTPUT0 #define FRAG_OUTPUT_COLOR1 S_TARGET_OUTPUT1 #define FRAG_OUTPUT_COLOR2 S_TARGET_OUTPUT2 #define FRAG_OUTPUT_COLOR3 S_TARGET_OUTPUT3 #define FRAG_OUTPUT_DEPTH S_DEPTH_OUTPUT //! Some defines to make textures compile with PSSL for now (sort out later) SamplerState globalSamplerState; SamplerComparisonState globalSamplerComparisonState { // Sampler state Filter = MIN_MAG_LINEAR_MIP_POINT; AddressU = CLAMP; AddressV = CLAMP; // Sampler comparison state ComparisonFunc = LESS; ComparisonFilter = COMPARISON_MIN_MAG_LINEAR_MIP_POINT; }; #define cbuffer ConstantBuffer #define sampler SamplerState #define sampler2D Texture2D #define sampler3D Texture3D #define samplerCUBE TextureCube #define tex2Dproj(a,b) a.Sample(globalSamplerState, (b).xy / (b).w) #define h1tex2Dproj(a,b) ((half)(a.Sample(globalSamplerState, (b).xy / (b).w).x)) #define h4tex2D(a,b) ((half4)a.Sample(globalSamplerState, (b).xy)) #define h4tex2Dlod(a,b) ((half4)a.SampleLOD(globalSamplerState, (b).xy, (b).w)) #define tex2D(a,b) a.Sample(globalSamplerState, (b).xy) #define SampleLevel SampleLOD #define SampleCmpLevelZero SampleCmpLOD0 #define StructuredBuffer RegularBuffer #define RWStructuredBuffer RW_RegularBuffer #define numthreads NUM_THREADS #define maxvertexcount MAX_VERTEX_COUNT #define groupshared thread_group_memory #define TriangleStream TriangleBuffer #define PointStream PointBuffer #define triangle Triangle #define IncrementCounter IncrementCount #define DecrementCounter DecrementCount #define GroupMemoryBarrierWithGroupSync ThreadGroupMemoryBarrierSync #define InterlockedMin AtomicMin #define InterlockedMax AtomicMax #define InterlockedAdd AtomicAdd #endif //! __ORBIS__ #if defined(PHYRE_D3DFX) && !defined(__ORBIS__) #define FRAG_OUTPUT_COLOR SV_TARGET #define FRAG_OUTPUT_COLOR0 SV_TARGET0 #define FRAG_OUTPUT_COLOR1 SV_TARGET1 #define FRAG_OUTPUT_COLOR2 SV_TARGET2 #define FRAG_OUTPUT_COLOR3 SV_TARGET3 #define FRAG_OUTPUT_DEPTH SV_DEPTH #define SYSTEM_PRIMITIVE_INDEX SV_PRIMITIVEID #endif //! defined(PHYRE_D3DFX) && !defined(__ORBIS__) #define D_D3D11_OTHER(x,y) x #define D_D3D11_ONLY(x) x #define POSITION_OUT POSITION #define FINAL_COLOR FRAG_OUTPUT_COLOR #else #define D_D3D11_OTHER(x,y) y #define D_D3D11_ONLY(x) #define HALF half #define HALF2 half2 #define HALF3 half3 #define HALF4 half4 #define HALF3x3 float3x3 #define HALF3x4 float3x4 #define HALF4x4 float4x4 #define POSITION_OUT POSITION #define FINAL_COLOR D_D3D11_OTHER(SV_TARGET0,COLOR) #endif #if defined(__psp2__) #define NATIVECOLOR __nativecolor #define REGFORMAT __regformat #else #define NATIVECOLOR #define REGFORMAT #endif #if !defined(__ORBIS__) && !defined(D_PLATFORM_GXM) BlendState NoBlend_BlendState { BlendEnable[0] = FALSE; }; BlendState Alpha_BlendState { BlendEnable[0] = TRUE; SrcBlend[0] = Src_Alpha; DestBlend[0] = Inv_Src_Alpha; BlendOp[0] = ADD; SrcBlendAlpha[0] = Src_Alpha; DestBlendAlpha[0] = Inv_Src_Alpha; BlendOpAlpha[0] = ADD; BlendEnable[1] = FALSE; }; BlendState Additive_BlendState { BlendEnable[0] = TRUE; SrcBlend[0] = Src_Alpha; DestBlend[0] = ONE; BlendOp[0] = ADD; SrcBlendAlpha[0] = Src_Alpha; DestBlendAlpha[0] = ONE; BlendOpAlpha[0] = ADD; BlendEnable[1] = FALSE; }; BlendState ParticleBlended_BlendState { BlendEnable[0] = TRUE; SrcBlend[0] = ONE; DestBlend[0] = Inv_Src_Alpha; BlendOp[0] = ADD; SrcBlendAlpha[0] = ONE; DestBlendAlpha[0] = Inv_Src_Alpha; BlendOpAlpha[0] = ADD; BlendEnable[1] = FALSE; }; DepthStencilState NoDepthTest_NoDepthWrite_DepthState { DepthEnable = FALSE; DepthWriteMask = Zero; DepthFunc = Less; StencilEnable = FALSE; }; DepthStencilState NoDepthTest_DepthWrite_DepthState { DepthEnable = FALSE; DepthWriteMask = All; DepthFunc = Less; StencilEnable = FALSE; }; DepthStencilState DepthTest_NoDepthWrite_DepthState { DepthEnable = TRUE; DepthWriteMask = Zero; DepthFunc = Less; StencilEnable = FALSE; }; DepthStencilState DepthTest_DepthWrite_DepthState { DepthEnable = TRUE; DepthWriteMask = All; DepthFunc = Less; StencilEnable = FALSE; }; RasterizerState NoCull_RasterizerState { CullMode=None; }; RasterizerState BackFaceCull_RasterizerState { CullMode=Back; FrontCounterClockwise = TRUE; }; RasterizerState FrontFaceCull_RasterizerState { CullMode=Front; FrontCounterClockwise = TRUE; }; #endif #if defined(D_PLATFORM_D3D11) || defined(D_PLATFORM_GNM) #define MatrixMul(a,b) mul(b,a) #define HALF float #define HALF2 float2 #define HALF3 float3 #define HALF4 float4 #define HALF3x3 float3x3 #define HALF3x4 float3x4 #define HALF4x4 float4x4 #define half float #define half2 float2 #define half3 float3 #define half4 float4 #else #define MatrixMul(a,b) mul(a,b) #endif // samplers #if defined(D_PLATFORM_D3D11) || defined(D_PLATFORM_GNM) sampler PointClampSampler : register(s8) { Filter = Min_Mag_Mip_Point; AddressU = Clamp; AddressV = Clamp; AddressW = Clamp; }; sampler LinearClampSampler : register(s9) { Filter = Min_Mag_Mip_Linear; AddressU = Clamp; AddressV = Clamp; AddressW = Clamp; }; sampler LinearWrapTSampler : register(s10) { Filter = Min_Mag_Mip_Linear; AddressU = Clamp; AddressV = Wrap; AddressW = Clamp; }; sampler LinearWrapSampler : register(s11) { Filter = Min_Mag_Mip_Linear; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; }; sampler PointWrapSampler : register(s12) { Filter = Min_Mag_Mip_Point; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; }; sampler AnisoClampSampler : register(s13) { Filter = ANISOTROPIC; AddressU = Clamp; AddressV = Clamp; AddressW = Clamp; MaxAnisotropy = 16; }; sampler LinearWrapAnisoSampler : register(s14) { Filter = ANISOTROPIC; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; MaxAnisotropy = 16; }; sampler PointWrapAnisoSampler : register(s15) { Filter = Min_Mag_Point_Mip_Linear; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; MaxAnisotropy = 16; }; #define SAMPLER_WRAP_ANISO LinearWrapAnisoSampler #define SAMPLER_WRAP_LINEAR LinearWrapSampler #define SAMPLER_WRAP_POINT PointWrapSampler #define SAMPLER_CLAMP_ANISO AnisoClampSampler #define SAMPLER_CLAMP_LINEAR LinearClampSampler #define SAMPLER_CLAMP_POINT PointClampSampler static const float kSRGB = 2.2f; #define SRGB_ON(x) pow(x,kSRGB) #define SRGB_OFF(x) x #define SAMPLETEX(tex,uv,filter,wrap,srgb) SRGB_##srgb(tex.Sample(SAMPLER_##wrap##_##filter, uv)) #ifdef __ORBIS__ #define D_DECLARE_TEXTURE2DMS_4(x) MS_Texture2D x #else #define D_DECLARE_TEXTURE2DMS_4(x) Texture2DMS x #endif #define D_DECLARE_TEXTURE2D_4(x) Texture2D x #define D_DECLARE_TEXTURE3D_4(x) Texture3D x #define D_DECLARE_TEXTURE_CUBE_4(x) TextureCube x #define D_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_POINT_SAMPLE_TEXTURE(tex,uv) tex.Sample(PointClampSampler,uv) #define D_SAMPLE_TEXTURE_PROJ(tex,uv) tex.Sample(LinearClampSampler,(float2) (uv.xy / uv.w) ) #define D_POINT_SAMPLE_TEXTURE_PROJ(tex,uv) tex.Sample(PointClampSampler,(float2) (uv.xy / uv.w) ) #define D_SAMPLE_TEXTURE_3D(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_SAMPLE_TEXTURE_WRAP_3D(tex,uv) tex.Sample(LinearWrapSampler,uv) #define D_H1_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).x #define D_H2_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).xy #define D_H3_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).xyz #define D_H4_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_H1_POINTSAMPLELEVEL_TEXTURE(tex,uv,lod) tex.SampleLevel(PointClampSampler,uv,lod).x #define D_H1_SAMPLELEVEL_TEXTURE(tex,uv,lod) tex.SampleLevel(LinearClampSampler,uv,lod).x #define D_H4_SAMPLELEVEL_TEXTURE(tex,uv,lod) tex.SampleLevel(LinearClampSampler,uv,lod) #if defined(D_PLATFORM_D3D11) #define D_H1_SAMPLE_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearClampSampler,uv).x,2.2f) #define D_H2_SAMPLE_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearClampSampler,uv).xy,2.2f) #define D_H3_SAMPLE_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f) #define D_H4_SAMPLE_SRGBTEXTURE(tex,uv) float4( pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f), tex.Sample(LinearClampSampler,uv).a ) #define D_H1_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearWrapSampler,uv).x,2.2f) #define D_H2_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearWrapSampler,uv).xy,2.2f) #define D_H3_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearWrapSampler,uv).xyz,2.2f) #define D_H4_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) float4( pow(tex.Sample(LinearWrapSampler,uv).xyz,2.2f), tex.Sample(LinearWrapSampler,uv).a ) #define D_H4_SAMPLE_WRAPT_SRGBTEXTURE(tex,uv) float4( pow(tex.Sample(LinearWrapTSampler,uv).xyz,2.2f), tex.Sample(LinearWrapTSampler,uv).a) #define D_H3_SAMPLE_WRAP_ANISO_SRGBTEXTURE(tex,uv) pow( tex.Sample(LinearWrapAnisoSampler,uv).xyz, 2.2f) #else #define D_H1_SAMPLE_SRGBTEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).x #define D_H2_SAMPLE_SRGBTEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).xy #define D_H3_SAMPLE_SRGBTEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).xyz #define D_H4_SAMPLE_SRGBTEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_H1_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).x #define D_H2_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).xy #define D_H3_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).xyz #define D_H4_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv) #define D_H4_SAMPLE_WRAPT_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapTSampler,uv) #endif #define D_H1_SAMPLE_WRAP_TEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).x #define D_H2_SAMPLE_WRAP_TEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).xy #define D_H3_SAMPLE_WRAP_TEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).xyz #define D_H4_SAMPLE_WRAP_TEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv) #define D_H1_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(LinearWrapAnisoSampler,uv).x #define D_H2_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(LinearWrapAnisoSampler,uv).xy #define D_H3_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(LinearWrapAnisoSampler,uv).xyz #define D_H4_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(LinearWrapAnisoSampler,uv) #define D_H1_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(PointWrapAnisoSampler,uv).x #define D_H2_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(PointWrapAnisoSampler,uv).xy #define D_H3_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(PointWrapAnisoSampler,uv).xyz #define D_H4_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(PointWrapAnisoSampler,uv) #define D_H2_SAMPLE_TEXTURE_3D(tex,uv) tex.Sample(LinearClampSampler,uv).xy #define D_H2_SAMPLE_WRAP_TEXTURE_3D(tex,uv) tex.Sample(LinearWrapSampler,uv).xy #if defined(D_PLATFORM_D3D11) #define D_H3_SAMPLE_TEXTURE_CUBE(tex,uv) pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f) #define D_H4_SAMPLE_TEXTURE_CUBE(tex,uv) float4( pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f), tex.Sample(LinearClampSampler,uv).a ) #define D_SAMPLE_TEXTURE_CUBE(tex,uv) float4( pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f), tex.Sample(LinearClampSampler,uv).a ) #else #define D_H3_SAMPLE_TEXTURE_CUBE(tex,uv) tex.Sample(LinearClampSampler,uv).xyz #define D_H4_SAMPLE_TEXTURE_CUBE(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_SAMPLE_TEXTURE_CUBE(tex,uv) tex.Sample(LinearClampSampler,uv) #endif #else #define D_DECLARE_TEXTURE2D_4(x) sampler2D x #define D_DECLARE_TEXTURE3D_4(x) sampler3D x #define D_DECLARE_TEXTURE_CUBE_4(x) samplerCUBE x #define D_SAMPLE_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_POINT_SAMPLE_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_SAMPLE_TEXTURE_PROJ(tex,uv) h4tex2Dproj(tex,uv.xyw) #define D_POINT_SAMPLE_TEXTURE_PROJ(tex,uv) h4tex2Dproj(tex,uv.xyw) #define D_SAMPLE_TEXTURE_CUBE(tex,uv) h4texCUBE(tex,uv) #define D_SAMPLE_TEXTURE_3D(tex,uv) h4tex3D(tex,uv) #define D_SAMPLE_TEXTURE_WRAP_3D(tex,uv) h4tex3D(tex,uv) #define D_H1_SAMPLE_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_POINTSAMPLELEVEL_TEXTURE(tex,uv,lod) h1tex2D(tex,uv).x #define D_H1_SAMPLELEVEL_TEXTURE(tex,uv,lod) h1tex2D(tex,uv).x #define D_H4_SAMPLELEVEL_TEXTURE(tex,uv,lod) h4tex2D(tex,uv) #define D_H1_SAMPLE_SRGBTEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_SRGBTEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_SRGBTEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_SRGBTEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_WRAP_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_WRAP_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_WRAP_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_WRAP_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_ANISO_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_ANISO_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_ANISO_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_ANISO_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H4_SAMPLE_WRAPT_SRGBTEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H2_SAMPLE_TEXTURE_3D(tex,uv) h2tex3D(tex,uv).xy #define D_H2_SAMPLE_WRAP_TEXTURE_3D(tex,uv) h2tex3D(tex,uv).xy #define D_H3_SAMPLE_TEXTURE_CUBE(tex,uv) h3texCUBE(tex,uv).xyz #define D_H4_SAMPLE_TEXTURE_CUBE(tex,uv) h4texCUBE(tex,uv) #endif #if !defined(GLOBAL_LEAN_AND_MEAN) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // these constants are system constants; uploaded by Phyre itself. // we can't do this, but we don't want to upload them all the time, either. consequently, we make these global // i guess we can eventually stuff these into a separate uniform buffer //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// float4x4 view : view ; // uploaded once per camera float4x4 projection : projection ; // view inverse float4x4 viewprojection : viewprojection ; float4 eyeDirectionWS : eyeDirectionWS ; float4 eyePositionWS : eyePositionWS ; float4 eyePositionOS : eyePositionOS ; float4 cameraNear : cameraNearFar ; float4x4 modelIT : modelit ; // uploaded per primitive // model inverse transpose float4x4 model : model ; float4x4 modelViewProj : modelviewproj ; #endif //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // depth conversion code, stolen from the sample code //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// float cameraNearTimesFar; float cameraFarMinusNear; float4 cameraNearFar; // Convert a depth value from post projection space to view space. float ConvertDepth(float depth) { // float viewSpaceZ = -(scene.cameraNearTimesFar / (depth * scene.cameraFarMinusNear - scene.cameraNearFar.y)); #if defined(D_PLATFORM_GXM) float viewSpaceZ = -(cameraNearTimesFar / (depth * cameraFarMinusNear - cameraNearFar.y)); #else float viewSpaceZ = -(cameraNearTimesFar / (depth * cameraFarMinusNear - cameraNearFar.y)); #endif return viewSpaceZ; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // skinning //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef SKINNING_ENABLED // grabbed off [PhyreCoreShaderShared.h] // Description: // Encapsulates the skinning transformation matrices. #if defined(D_PLATFORM_GXM) #define PE_MAX_SKIN_CB_TRANSFORMS 32 float4x4 boneTransforms[PE_MAX_SKIN_CB_TRANSFORMS]; float4x4 GenerateBoneMatrix(int4 SkinIndices,float4 SkinWeights) { return boneTransforms[SkinIndices[0]]*SkinWeights[0] + boneTransforms[SkinIndices[1]]*SkinWeights[1] + boneTransforms[SkinIndices[2]]*SkinWeights[2] + boneTransforms[SkinIndices[3]]*SkinWeights[3]; } #else #define PE_MAX_SKIN_CB_TRANSFORMS 32 struct PSkinTransforms { float4x4 Mtxs[PE_MAX_SKIN_CB_TRANSFORMS]; // The skinning transformation matrices. }; cbuffer BoneTransformConstantBuffer { PSkinTransforms SkinTransforms; } float4x4 GenerateBoneMatrix(uint4 SkinIndices,float4 SkinWeights) { return SkinTransforms.Mtxs[SkinIndices[0]]*SkinWeights[0] + SkinTransforms.Mtxs[SkinIndices[1]]*SkinWeights[1] + SkinTransforms.Mtxs[SkinIndices[2]]*SkinWeights[2] + SkinTransforms.Mtxs[SkinIndices[3]]*SkinWeights[3]; } #endif #endif //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static const float4x4 SCALE_BIAS = float4x4( float4( 0.5, 0.0, 0.0, 0.5 ), #if defined(D_PLATFORM_D3D11) float4( 0.0, -0.5, 0.0, 0.5 ), #else float4( 0.0, 0.5, 0.0, 0.5 ), #endif float4( 0.0, 0.0, 0.5, 0.5 ), float4( 0.0, 0.0, 0.0, 1.0 ) ); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef D_PLATFORM_GXM #define D_INT_MOD(val,mod) (frac((floor((float)val)/mod))*mod) #define D_UINT_MOD(val,mod) (frac((floor((float)val)/mod))*mod) #elif defined(D_PLATFORM_GNM) #define D_INT_MOD(val,mod) ((int)floor(val) % mod) #define D_UINT_MOD(val,mod) ((uint)floor(val) % mod) #else #define D_INT_MOD(val,mod) ((int)floor(val) % mod) #define D_UINT_MOD(val,mod) ((int)floor(val) % mod) #endif //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef D_ENABLE_DEBUG_PARAMS float4 debugVars0; float4 debugVars1; float4 debugVars2; float4 debugVars3; float4 debugVars4; float4 debugVars5; float4 debugVars6; float4 debugVars7; #define GETDEBUGVAR(dv) (debugVars##dv!=0) ? (debugVars##dv) : #define GETDEBUGVAR2(dv,scl) (debugVars##dv!=0) ? (scl*debugVars##dv) : #endif #define powsafe(_x,_y) pow(max(_x,0.00000000000001),_y) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #endif//MIGRATORY_SH #line 61 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" float4 eyePositionWS : eyePositionWS ; #ifdef SKINNING_ENABLED float4x4 viewprojection : viewprojection ; #else float4x4 model : model ; float4x4 modelIT : modelit ; #endif float4x4 modelViewProj : modelviewproj ; float4x4 modelI : modeli ; #ifndef D_PREPASS_ENABLED // Notes: Base shader for decoration meshes. // // Author: John Edwards // Date C: 4-23-2010 // From Phyre: // Env params: HALF4 l_d; #if defined( SNOW_TOP ) || defined( SAND_TOP ) || defined( SAND_SIDE ) || defined( SNOW_FULL ) || defined( SAND_FULL ) HALF4 wind; #endif // Snow params #ifdef SNOW_TOP HALF snowBias; #endif #ifdef FOG HALF4 f_se; HALF4 f_cc, f_fc; #endif #ifdef UV_OFFSET float4 uvOffset; #endif #ifdef CHAMELEON #ifndef CHAM_NORM float4 chamDir; #endif #endif #endif//D_PREPASS_ENABLED #ifdef SKINNING_ENABLED struct a2v { #ifdef __ORBIS__ float4 SkinnableVertex : POSITION; #else float3 SkinnableVertex : POSITION; #endif float3 SkinnableNormal : NORMAL; float4 uv0 : TEXCOORD0; float4 uv1 : TEXCOORD1; float4 Color : COLOR; #if defined(D_PLATFORM_GXM) int4 SkinIndices : BLENDINDICES; #else uint4 SkinIndices : BLENDINDICES; #endif float4 SkinWeights : BLENDWEIGHTS; }; struct a2v_noSkin #else struct a2v #endif { #ifdef __ORBIS__ float4 Position : POSITION; #else float3 Position : POSITION; #endif HALF3 normal : NORMAL; HALF4 color : COLOR0; float4 uv0 : TEXCOORD0; float4 uv1 : TEXCOORD1; }; #ifdef SKINNING_ENABLED a2v_noSkin ProcessSkInput(a2v skIn) { float4x4 transformMatrix = GenerateBoneMatrix(skIn.SkinIndices,skIn.SkinWeights); a2v_noSkin ret; ret.Position.xyz = MatrixMul(transformMatrix,float4(skIn.SkinnableVertex.xyz,1)).xyz; #ifdef __ORBIS__ ret.Position.w = 1; #endif ret.normal = MatrixMul((float3x3)transformMatrix,skIn.SkinnableNormal); ret.color = skIn.Color; ret.uv0 = skIn.uv0; ret.uv1 = skIn.uv1; return ret; } #endif//SKINNING_ENABLED struct v2f { float4 position : POSITION_OUT; HALF4 color : COLOR0; HALF4 uv0 : TEXCOORD0; HALF4 uv1 : TEXCOORD1; float4 locCham : TEXCOORD2; // xyz == loc, w == chamBase HALF4 normalFr : TEXCOORD3; // xyz == normal, w == sand fresnel #if defined( SNOW_TOP ) || defined( SAND_TOP ) || defined( SAND_SIDE ) || defined( SNOW_FULL ) || defined( SAND_FULL ) HALF3 sandVars : TEXCOORD4; // x == windRatio, y == bleed, z == noiseFade #endif #ifdef FOG HALF4 fog : TEXCOORD5; // rgb == color, a == intensity #endif }; //-------------------------------------------- // Program entry //-------------------------------------------- void main( #ifdef SKINNING_ENABLED in a2v IN_VAL, #else in a2v IN, #endif out v2f OUT) { #ifdef SKINNING_ENABLED a2v_noSkin IN = ProcessSkInput(IN_VAL); float3 worldPos = IN.Position.xyz; OUT.position = MatrixMul( viewprojection, float4(IN.Position.xyz,1.0f) ); half3 worldNorm = normalize( IN.normal ); #else float3 worldPos = MatrixMul( model, float4(IN.Position.xyz,1.0f) ).xyz; OUT.position = MatrixMul( modelViewProj, float4(IN.Position.xyz,1.0f) ); half3 worldNorm = normalize( MatrixMul( (float3x3)modelIT, IN.normal ) ); #endif OUT.color.rgb = IN.color.rgb; OUT.color.a = IN.color.a; OUT.uv0 = IN.uv0; OUT.uv1 = IN.uv1; #ifdef UV_OFFSET OUT.uv0 += uvOffset.xyxy; OUT.uv1 += uvOffset.xyxy; #endif OUT.locCham.xyz = worldPos; #ifdef CHAMELEON #ifdef UV_CHAM #ifdef CHAM_NORM OUT.locCham.w = IN.uv1.w; #else OUT.locCham.w = dot( chamDir.xy, IN.uv1.zw ); #endif #else #ifdef SKINNING_ENABLED OUT.locCham.w = dot( chamDir.xyz, MatrixMul( modelI, float4(IN.Position.xyz,1.0f) ).xyz ); #else OUT.locCham.w = dot( chamDir.xyz, IN.Position.xyz ); #endif #endif #endif OUT.normalFr.xyz = worldNorm; OUT.normalFr.w = 0; #ifdef SAND_DETAIL // Calculate Fresnel. half3 Ln = normalize( l_d.xyz ); half3 Vn = normalize( eyePositionWS.xyz - worldPos ); half3 Hn = normalize( Vn + Ln ); float base = saturate( 1.0 - dot( Vn, Hn ) ); float exponential = pow( base, 5.0 ); float F0spec = 0.01; // Skin is 0.028; float fresnelSpec = exponential + F0spec * (1.0 - exponential); OUT.normalFr.w = fresnelSpec; #endif #if defined( SNOW_TOP ) || defined( SAND_TOP ) || defined( SAND_SIDE ) || defined( SNOW_FULL ) || defined( SAND_FULL ) half windForce = min( (length( wind.xyz ) - 10) / 70, 1.0 ); #ifdef SNOW_TOP half windRatio = saturate( worldNorm.y ) + snowBias; half bleed = 0.03; #else //half windRatio = saturate( dot( worldNorm, normalize( wind.xyz ) + half3( 0, 0.65, 0 ) ) ); half windRatio = saturate( worldNorm.y )*.65; half bleed = lerp( 0.5, 0.05, windForce ); #endif half depth = length( eyePositionWS.xyz - worldPos ); half noiseFade = saturate( 1.5 - depth * 0.02 ); OUT.sandVars = float3( windRatio, bleed, noiseFade ); #endif #ifdef FOG float3 pos = MatrixMul( model, float4(IN.Position.xyz,1.0f) ).xyz; float3 eye = eyePositionWS - pos; half rayS = min( eyePositionWS.y, pos.y ); half rayE = max( eyePositionWS.y, pos.y ) + 0.5; // Prevent div by 0. half rayH = rayE - rayS; half fogS = f_se.z; half fogE = f_se.w; half fogH = fogE - fogS; half midS = min( rayS, fogE ); half midE = min( rayE, fogE ); half midA = 0.5 * (midS + midE); half midH = midE - midS; half fogY = ((fogE - midA) * midH) / (fogH * rayH); half fogRatio = saturate( (fogY * length( eye ) - f_se.x) / (f_se.y - f_se.x) ); fogRatio *= fogRatio; half3 fogColor = lerp( f_cc.rgb, f_fc.rgb, fogRatio ); half fogAlpha = lerp( f_cc.a, f_fc.a, fogRatio ); OUT.fog = half4( fogColor, fogRatio*fogAlpha ); #endif } // ------------------------------------------------------------------------------------------------------------------------------------------ #undef main #undef IN #undef OUT #undef v2f #undef a2v // ===================================================================================================================[PIXEL SHADER BEGIN]=== #define main Opaque_fs_main #define IN Opaque_fs_IN #define OUT Opaque_fs_OUT #define v2f Opaque_fs_v2f #define f2f Opaque_fs_f2f // ------------------------------------------------------------------------------------------------------------------------------------------ #define GLOBAL_LEAN_AND_MEAN #line 1 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #ifndef MIGRATORY_SH #define MIGRATORY_SH //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef D_PLATFORM_D3D11x64 #define D_PLATFORM_D3D11 #endif #ifdef D_PLATFORM_D3D11 //#pragma pack_matrix(column_major) #define D_D3D11_OTHER(x,y) x #define D_D3D11_ONLY(x) x #define POSITION_OUT SV_POSITION #define FINAL_COLOR D_D3D11_OTHER(SV_TARGET0,COLOR) #elif defined(D_PLATFORM_GNM) #ifdef __ORBIS__ #pragma warning (disable:5203) // parameter unreferenced #pragma warning (disable:5206) // local variable unreferenced #pragma warning (disable:6204) // does not support uniform default values #pragma warning (disable:6459) // __user_defined__ is not a valid semantic for uniform #pragma warning (disable:5581) // PSSL treats 'half' type as 'float' #pragma warning (disable:5609) // PSSL treats 'half' type as 'float' #pragma warning (disable:5583) // PSSL treats 'half' literals as 'float' #pragma warning (disable:5524) // unsupported compiler hint //! Some evil #defines to sort out matrix multiplies. #define float4x4 row_major float4x4 #define float3x4 row_major float3x4 #define float4x3 row_major float4x3 //! Semantics for VS/PS inputs and outputs. #define POSITION S_POSITION #define SV_POSITION S_POSITION #define SV_GroupID S_GROUP_ID #define SV_VertexID S_VERTEX_ID #define SV_DispatchThreadID S_DISPATCH_THREAD_ID #define SV_GroupThreadID S_GROUP_THREAD_ID #define SV_GroupIndex S_GROUP_INDEX #define SV_PRIMITIVEID S_PRIMITIVE_ID #define SV_IsFrontFace S_FRONT_FACE #define SV_Depth FRAG_OUTPUT_DEPTH #define FRAG_OUTPUT_COLOR S_TARGET_OUTPUT0 #define FRAG_OUTPUT_COLOR0 S_TARGET_OUTPUT0 #define FRAG_OUTPUT_COLOR1 S_TARGET_OUTPUT1 #define FRAG_OUTPUT_COLOR2 S_TARGET_OUTPUT2 #define FRAG_OUTPUT_COLOR3 S_TARGET_OUTPUT3 #define FRAG_OUTPUT_DEPTH S_DEPTH_OUTPUT //! Some defines to make textures compile with PSSL for now (sort out later) SamplerState globalSamplerState; SamplerComparisonState globalSamplerComparisonState { // Sampler state Filter = MIN_MAG_LINEAR_MIP_POINT; AddressU = CLAMP; AddressV = CLAMP; // Sampler comparison state ComparisonFunc = LESS; ComparisonFilter = COMPARISON_MIN_MAG_LINEAR_MIP_POINT; }; #define cbuffer ConstantBuffer #define sampler SamplerState #define sampler2D Texture2D #define sampler3D Texture3D #define samplerCUBE TextureCube #define tex2Dproj(a,b) a.Sample(globalSamplerState, (b).xy / (b).w) #define h1tex2Dproj(a,b) ((half)(a.Sample(globalSamplerState, (b).xy / (b).w).x)) #define h4tex2D(a,b) ((half4)a.Sample(globalSamplerState, (b).xy)) #define h4tex2Dlod(a,b) ((half4)a.SampleLOD(globalSamplerState, (b).xy, (b).w)) #define tex2D(a,b) a.Sample(globalSamplerState, (b).xy) #define SampleLevel SampleLOD #define SampleCmpLevelZero SampleCmpLOD0 #define StructuredBuffer RegularBuffer #define RWStructuredBuffer RW_RegularBuffer #define numthreads NUM_THREADS #define maxvertexcount MAX_VERTEX_COUNT #define groupshared thread_group_memory #define TriangleStream TriangleBuffer #define PointStream PointBuffer #define triangle Triangle #define IncrementCounter IncrementCount #define DecrementCounter DecrementCount #define GroupMemoryBarrierWithGroupSync ThreadGroupMemoryBarrierSync #define InterlockedMin AtomicMin #define InterlockedMax AtomicMax #define InterlockedAdd AtomicAdd #endif //! __ORBIS__ #if defined(PHYRE_D3DFX) && !defined(__ORBIS__) #define FRAG_OUTPUT_COLOR SV_TARGET #define FRAG_OUTPUT_COLOR0 SV_TARGET0 #define FRAG_OUTPUT_COLOR1 SV_TARGET1 #define FRAG_OUTPUT_COLOR2 SV_TARGET2 #define FRAG_OUTPUT_COLOR3 SV_TARGET3 #define FRAG_OUTPUT_DEPTH SV_DEPTH #define SYSTEM_PRIMITIVE_INDEX SV_PRIMITIVEID #endif //! defined(PHYRE_D3DFX) && !defined(__ORBIS__) #define D_D3D11_OTHER(x,y) x #define D_D3D11_ONLY(x) x #define POSITION_OUT POSITION #define FINAL_COLOR FRAG_OUTPUT_COLOR #else #define D_D3D11_OTHER(x,y) y #define D_D3D11_ONLY(x) #define HALF half #define HALF2 half2 #define HALF3 half3 #define HALF4 half4 #define HALF3x3 float3x3 #define HALF3x4 float3x4 #define HALF4x4 float4x4 #define POSITION_OUT POSITION #define FINAL_COLOR D_D3D11_OTHER(SV_TARGET0,COLOR) #endif #if defined(__psp2__) #define NATIVECOLOR __nativecolor #define REGFORMAT __regformat #else #define NATIVECOLOR #define REGFORMAT #endif #if !defined(__ORBIS__) && !defined(D_PLATFORM_GXM) BlendState NoBlend_BlendState { BlendEnable[0] = FALSE; }; BlendState Alpha_BlendState { BlendEnable[0] = TRUE; SrcBlend[0] = Src_Alpha; DestBlend[0] = Inv_Src_Alpha; BlendOp[0] = ADD; SrcBlendAlpha[0] = Src_Alpha; DestBlendAlpha[0] = Inv_Src_Alpha; BlendOpAlpha[0] = ADD; BlendEnable[1] = FALSE; }; BlendState Additive_BlendState { BlendEnable[0] = TRUE; SrcBlend[0] = Src_Alpha; DestBlend[0] = ONE; BlendOp[0] = ADD; SrcBlendAlpha[0] = Src_Alpha; DestBlendAlpha[0] = ONE; BlendOpAlpha[0] = ADD; BlendEnable[1] = FALSE; }; BlendState ParticleBlended_BlendState { BlendEnable[0] = TRUE; SrcBlend[0] = ONE; DestBlend[0] = Inv_Src_Alpha; BlendOp[0] = ADD; SrcBlendAlpha[0] = ONE; DestBlendAlpha[0] = Inv_Src_Alpha; BlendOpAlpha[0] = ADD; BlendEnable[1] = FALSE; }; DepthStencilState NoDepthTest_NoDepthWrite_DepthState { DepthEnable = FALSE; DepthWriteMask = Zero; DepthFunc = Less; StencilEnable = FALSE; }; DepthStencilState NoDepthTest_DepthWrite_DepthState { DepthEnable = FALSE; DepthWriteMask = All; DepthFunc = Less; StencilEnable = FALSE; }; DepthStencilState DepthTest_NoDepthWrite_DepthState { DepthEnable = TRUE; DepthWriteMask = Zero; DepthFunc = Less; StencilEnable = FALSE; }; DepthStencilState DepthTest_DepthWrite_DepthState { DepthEnable = TRUE; DepthWriteMask = All; DepthFunc = Less; StencilEnable = FALSE; }; RasterizerState NoCull_RasterizerState { CullMode=None; }; RasterizerState BackFaceCull_RasterizerState { CullMode=Back; FrontCounterClockwise = TRUE; }; RasterizerState FrontFaceCull_RasterizerState { CullMode=Front; FrontCounterClockwise = TRUE; }; #endif #if defined(D_PLATFORM_D3D11) || defined(D_PLATFORM_GNM) #define MatrixMul(a,b) mul(b,a) #define HALF float #define HALF2 float2 #define HALF3 float3 #define HALF4 float4 #define HALF3x3 float3x3 #define HALF3x4 float3x4 #define HALF4x4 float4x4 #define half float #define half2 float2 #define half3 float3 #define half4 float4 #else #define MatrixMul(a,b) mul(a,b) #endif // samplers #if defined(D_PLATFORM_D3D11) || defined(D_PLATFORM_GNM) sampler PointClampSampler : register(s8) { Filter = Min_Mag_Mip_Point; AddressU = Clamp; AddressV = Clamp; AddressW = Clamp; }; sampler LinearClampSampler : register(s9) { Filter = Min_Mag_Mip_Linear; AddressU = Clamp; AddressV = Clamp; AddressW = Clamp; }; sampler LinearWrapTSampler : register(s10) { Filter = Min_Mag_Mip_Linear; AddressU = Clamp; AddressV = Wrap; AddressW = Clamp; }; sampler LinearWrapSampler : register(s11) { Filter = Min_Mag_Mip_Linear; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; }; sampler PointWrapSampler : register(s12) { Filter = Min_Mag_Mip_Point; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; }; sampler AnisoClampSampler : register(s13) { Filter = ANISOTROPIC; AddressU = Clamp; AddressV = Clamp; AddressW = Clamp; MaxAnisotropy = 16; }; sampler LinearWrapAnisoSampler : register(s14) { Filter = ANISOTROPIC; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; MaxAnisotropy = 16; }; sampler PointWrapAnisoSampler : register(s15) { Filter = Min_Mag_Point_Mip_Linear; AddressU = Wrap; AddressV = Wrap; AddressW = Wrap; MaxAnisotropy = 16; }; #define SAMPLER_WRAP_ANISO LinearWrapAnisoSampler #define SAMPLER_WRAP_LINEAR LinearWrapSampler #define SAMPLER_WRAP_POINT PointWrapSampler #define SAMPLER_CLAMP_ANISO AnisoClampSampler #define SAMPLER_CLAMP_LINEAR LinearClampSampler #define SAMPLER_CLAMP_POINT PointClampSampler static const float kSRGB = 2.2f; #define SRGB_ON(x) pow(x,kSRGB) #define SRGB_OFF(x) x #define SAMPLETEX(tex,uv,filter,wrap,srgb) SRGB_##srgb(tex.Sample(SAMPLER_##wrap##_##filter, uv)) #ifdef __ORBIS__ #define D_DECLARE_TEXTURE2DMS_4(x) MS_Texture2D x #else #define D_DECLARE_TEXTURE2DMS_4(x) Texture2DMS x #endif #define D_DECLARE_TEXTURE2D_4(x) Texture2D x #define D_DECLARE_TEXTURE3D_4(x) Texture3D x #define D_DECLARE_TEXTURE_CUBE_4(x) TextureCube x #define D_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_POINT_SAMPLE_TEXTURE(tex,uv) tex.Sample(PointClampSampler,uv) #define D_SAMPLE_TEXTURE_PROJ(tex,uv) tex.Sample(LinearClampSampler,(float2) (uv.xy / uv.w) ) #define D_POINT_SAMPLE_TEXTURE_PROJ(tex,uv) tex.Sample(PointClampSampler,(float2) (uv.xy / uv.w) ) #define D_SAMPLE_TEXTURE_3D(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_SAMPLE_TEXTURE_WRAP_3D(tex,uv) tex.Sample(LinearWrapSampler,uv) #define D_H1_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).x #define D_H2_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).xy #define D_H3_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).xyz #define D_H4_SAMPLE_TEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_H1_POINTSAMPLELEVEL_TEXTURE(tex,uv,lod) tex.SampleLevel(PointClampSampler,uv,lod).x #define D_H1_SAMPLELEVEL_TEXTURE(tex,uv,lod) tex.SampleLevel(LinearClampSampler,uv,lod).x #define D_H4_SAMPLELEVEL_TEXTURE(tex,uv,lod) tex.SampleLevel(LinearClampSampler,uv,lod) #if defined(D_PLATFORM_D3D11) #define D_H1_SAMPLE_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearClampSampler,uv).x,2.2f) #define D_H2_SAMPLE_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearClampSampler,uv).xy,2.2f) #define D_H3_SAMPLE_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f) #define D_H4_SAMPLE_SRGBTEXTURE(tex,uv) float4( pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f), tex.Sample(LinearClampSampler,uv).a ) #define D_H1_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearWrapSampler,uv).x,2.2f) #define D_H2_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearWrapSampler,uv).xy,2.2f) #define D_H3_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) pow(tex.Sample(LinearWrapSampler,uv).xyz,2.2f) #define D_H4_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) float4( pow(tex.Sample(LinearWrapSampler,uv).xyz,2.2f), tex.Sample(LinearWrapSampler,uv).a ) #define D_H4_SAMPLE_WRAPT_SRGBTEXTURE(tex,uv) float4( pow(tex.Sample(LinearWrapTSampler,uv).xyz,2.2f), tex.Sample(LinearWrapTSampler,uv).a) #define D_H3_SAMPLE_WRAP_ANISO_SRGBTEXTURE(tex,uv) pow( tex.Sample(LinearWrapAnisoSampler,uv).xyz, 2.2f) #else #define D_H1_SAMPLE_SRGBTEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).x #define D_H2_SAMPLE_SRGBTEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).xy #define D_H3_SAMPLE_SRGBTEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv).xyz #define D_H4_SAMPLE_SRGBTEXTURE(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_H1_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).x #define D_H2_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).xy #define D_H3_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).xyz #define D_H4_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv) #define D_H4_SAMPLE_WRAPT_SRGBTEXTURE(tex,uv) tex.Sample(LinearWrapTSampler,uv) #endif #define D_H1_SAMPLE_WRAP_TEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).x #define D_H2_SAMPLE_WRAP_TEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).xy #define D_H3_SAMPLE_WRAP_TEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv).xyz #define D_H4_SAMPLE_WRAP_TEXTURE(tex,uv) tex.Sample(LinearWrapSampler,uv) #define D_H1_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(LinearWrapAnisoSampler,uv).x #define D_H2_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(LinearWrapAnisoSampler,uv).xy #define D_H3_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(LinearWrapAnisoSampler,uv).xyz #define D_H4_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(LinearWrapAnisoSampler,uv) #define D_H1_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(PointWrapAnisoSampler,uv).x #define D_H2_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(PointWrapAnisoSampler,uv).xy #define D_H3_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(PointWrapAnisoSampler,uv).xyz #define D_H4_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) tex.Sample(PointWrapAnisoSampler,uv) #define D_H2_SAMPLE_TEXTURE_3D(tex,uv) tex.Sample(LinearClampSampler,uv).xy #define D_H2_SAMPLE_WRAP_TEXTURE_3D(tex,uv) tex.Sample(LinearWrapSampler,uv).xy #if defined(D_PLATFORM_D3D11) #define D_H3_SAMPLE_TEXTURE_CUBE(tex,uv) pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f) #define D_H4_SAMPLE_TEXTURE_CUBE(tex,uv) float4( pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f), tex.Sample(LinearClampSampler,uv).a ) #define D_SAMPLE_TEXTURE_CUBE(tex,uv) float4( pow(tex.Sample(LinearClampSampler,uv).xyz,2.2f), tex.Sample(LinearClampSampler,uv).a ) #else #define D_H3_SAMPLE_TEXTURE_CUBE(tex,uv) tex.Sample(LinearClampSampler,uv).xyz #define D_H4_SAMPLE_TEXTURE_CUBE(tex,uv) tex.Sample(LinearClampSampler,uv) #define D_SAMPLE_TEXTURE_CUBE(tex,uv) tex.Sample(LinearClampSampler,uv) #endif #else #define D_DECLARE_TEXTURE2D_4(x) sampler2D x #define D_DECLARE_TEXTURE3D_4(x) sampler3D x #define D_DECLARE_TEXTURE_CUBE_4(x) samplerCUBE x #define D_SAMPLE_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_POINT_SAMPLE_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_SAMPLE_TEXTURE_PROJ(tex,uv) h4tex2Dproj(tex,uv.xyw) #define D_POINT_SAMPLE_TEXTURE_PROJ(tex,uv) h4tex2Dproj(tex,uv.xyw) #define D_SAMPLE_TEXTURE_CUBE(tex,uv) h4texCUBE(tex,uv) #define D_SAMPLE_TEXTURE_3D(tex,uv) h4tex3D(tex,uv) #define D_SAMPLE_TEXTURE_WRAP_3D(tex,uv) h4tex3D(tex,uv) #define D_H1_SAMPLE_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_POINTSAMPLELEVEL_TEXTURE(tex,uv,lod) h1tex2D(tex,uv).x #define D_H1_SAMPLELEVEL_TEXTURE(tex,uv,lod) h1tex2D(tex,uv).x #define D_H4_SAMPLELEVEL_TEXTURE(tex,uv,lod) h4tex2D(tex,uv) #define D_H1_SAMPLE_SRGBTEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_SRGBTEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_SRGBTEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_SRGBTEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_WRAP_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_WRAP_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_WRAP_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_WRAP_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_WRAP_ANISO_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_ANISO_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_ANISO_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_ANISO_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_ANISO_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_POINT_WRAP_ANISO_TEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H1_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) h1tex2D(tex,uv).x #define D_H2_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) h2tex2D(tex,uv).xy #define D_H3_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) h3tex2D(tex,uv).xyz #define D_H4_SAMPLE_WRAP_SRGBTEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H4_SAMPLE_WRAPT_SRGBTEXTURE(tex,uv) h4tex2D(tex,uv) #define D_H2_SAMPLE_TEXTURE_3D(tex,uv) h2tex3D(tex,uv).xy #define D_H2_SAMPLE_WRAP_TEXTURE_3D(tex,uv) h2tex3D(tex,uv).xy #define D_H3_SAMPLE_TEXTURE_CUBE(tex,uv) h3texCUBE(tex,uv).xyz #define D_H4_SAMPLE_TEXTURE_CUBE(tex,uv) h4texCUBE(tex,uv) #endif #if !defined(GLOBAL_LEAN_AND_MEAN) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // these constants are system constants; uploaded by Phyre itself. // we can't do this, but we don't want to upload them all the time, either. consequently, we make these global // i guess we can eventually stuff these into a separate uniform buffer //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// float4x4 view : view ; // uploaded once per camera float4x4 projection : projection ; // view inverse float4x4 viewprojection : viewprojection ; float4 eyeDirectionWS : eyeDirectionWS ; float4 eyePositionWS : eyePositionWS ; float4 eyePositionOS : eyePositionOS ; float4 cameraNear : cameraNearFar ; float4x4 modelIT : modelit ; // uploaded per primitive // model inverse transpose float4x4 model : model ; float4x4 modelViewProj : modelviewproj ; #endif //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // depth conversion code, stolen from the sample code //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// float cameraNearTimesFar; float cameraFarMinusNear; float4 cameraNearFar; // Convert a depth value from post projection space to view space. float ConvertDepth(float depth) { // float viewSpaceZ = -(scene.cameraNearTimesFar / (depth * scene.cameraFarMinusNear - scene.cameraNearFar.y)); #if defined(D_PLATFORM_GXM) float viewSpaceZ = -(cameraNearTimesFar / (depth * cameraFarMinusNear - cameraNearFar.y)); #else float viewSpaceZ = -(cameraNearTimesFar / (depth * cameraFarMinusNear - cameraNearFar.y)); #endif return viewSpaceZ; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // skinning //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef SKINNING_ENABLED // grabbed off [PhyreCoreShaderShared.h] // Description: // Encapsulates the skinning transformation matrices. #if defined(D_PLATFORM_GXM) #define PE_MAX_SKIN_CB_TRANSFORMS 32 float4x4 boneTransforms[PE_MAX_SKIN_CB_TRANSFORMS]; float4x4 GenerateBoneMatrix(int4 SkinIndices,float4 SkinWeights) { return boneTransforms[SkinIndices[0]]*SkinWeights[0] + boneTransforms[SkinIndices[1]]*SkinWeights[1] + boneTransforms[SkinIndices[2]]*SkinWeights[2] + boneTransforms[SkinIndices[3]]*SkinWeights[3]; } #else #define PE_MAX_SKIN_CB_TRANSFORMS 32 struct PSkinTransforms { float4x4 Mtxs[PE_MAX_SKIN_CB_TRANSFORMS]; // The skinning transformation matrices. }; cbuffer BoneTransformConstantBuffer { PSkinTransforms SkinTransforms; } float4x4 GenerateBoneMatrix(uint4 SkinIndices,float4 SkinWeights) { return SkinTransforms.Mtxs[SkinIndices[0]]*SkinWeights[0] + SkinTransforms.Mtxs[SkinIndices[1]]*SkinWeights[1] + SkinTransforms.Mtxs[SkinIndices[2]]*SkinWeights[2] + SkinTransforms.Mtxs[SkinIndices[3]]*SkinWeights[3]; } #endif #endif //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static const float4x4 SCALE_BIAS = float4x4( float4( 0.5, 0.0, 0.0, 0.5 ), #if defined(D_PLATFORM_D3D11) float4( 0.0, -0.5, 0.0, 0.5 ), #else float4( 0.0, 0.5, 0.0, 0.5 ), #endif float4( 0.0, 0.0, 0.5, 0.5 ), float4( 0.0, 0.0, 0.0, 1.0 ) ); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef D_PLATFORM_GXM #define D_INT_MOD(val,mod) (frac((floor((float)val)/mod))*mod) #define D_UINT_MOD(val,mod) (frac((floor((float)val)/mod))*mod) #elif defined(D_PLATFORM_GNM) #define D_INT_MOD(val,mod) ((int)floor(val) % mod) #define D_UINT_MOD(val,mod) ((uint)floor(val) % mod) #else #define D_INT_MOD(val,mod) ((int)floor(val) % mod) #define D_UINT_MOD(val,mod) ((int)floor(val) % mod) #endif //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef D_ENABLE_DEBUG_PARAMS float4 debugVars0; float4 debugVars1; float4 debugVars2; float4 debugVars3; float4 debugVars4; float4 debugVars5; float4 debugVars6; float4 debugVars7; #define GETDEBUGVAR(dv) (debugVars##dv!=0) ? (debugVars##dv) : #define GETDEBUGVAR2(dv,scl) (debugVars##dv!=0) ? (scl*debugVars##dv) : #endif #define powsafe(_x,_y) pow(max(_x,0.00000000000001),_y) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #endif//MIGRATORY_SH #line 302 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" // Notes: Base shader for decoration meshes. // // Author: John Edwards // Date C: 4-23-2010 #ifndef D_PREPASS_ENABLED #if defined(D_PLATFORM_GCM) #pragma regcount 12 #endif // LOD params: #ifdef D_PLATFORM_GXM D_DECLARE_TEXTURE2D_4(noise3dSmallTex); #else D_DECLARE_TEXTURE3D_4(noise3dSmallTex); #endif #if defined( SNOW_FULL ) || defined( SAND_FULL ) D_DECLARE_TEXTURE2D_4(noiseSandTex); #if defined( SNOW_FULL ) HALF4 lumpGrainMult; #endif #endif // Env params HALF4 l_c, l_s; #ifndef PHYRE3X_ENABLED HALF4 l_d; #endif HALF opacity; HALF velvetInt, velvetRatio; // Level of detail slider HALF lod; // For color correcting incoming textures. HALF4x4 colorCorrect; // Albedo textures D_DECLARE_TEXTURE2D_4(texColor); D_DECLARE_TEXTURE2D_4(texDetail); D_DECLARE_TEXTURE2D_4(texRamp); // Ambient occlusion texture D_DECLARE_TEXTURE2D_4(texAo); // Sand and shadow edges are filtered through this texture D_DECLARE_TEXTURE2D_4(texEdgeMask); // Sand params D_DECLARE_TEXTURE2D_4(sandFastTexture); D_DECLARE_TEXTURE_CUBE_4(sandLoIrrCube); #ifdef SAND_FANCY D_DECLARE_TEXTURE_CUBE_4(sandHiIrrCube); #endif float4 sandBias; float4 sandScale; D_DECLARE_TEXTURE2D_4(heightTexture); float4 heightBiasUv; float4 heightScaleUv; float heightBiasY; D_DECLARE_TEXTURE2D_4(duneTexture); D_DECLARE_TEXTURE2D_4(duneColorTexture); #ifdef SAND_SIDE HALF duneHeightOff; #endif #if defined( SNOW_FULL ) || defined( SAND_FULL ) HALF sparkleHint; #endif // AO HALF4 aoStepBiasInt; // For dynamic AO float4 localDudePos; float4 remoteDudePos; #ifdef SPECULAR HALF4 specular; // x == intensity, y == gloss, z == F0 #endif HALF4 uvMlt; // x == color, y == ao, // Chameleon effect texture swapping effect #ifdef CHAMELEON D_DECLARE_TEXTURE2D_4(texCham); D_DECLARE_TEXTURE2D_4(texChamMask); HALF4 chamColor; HALF4 chamEdgeColor; HALF chamLevel; #ifdef CHAM_NORM HALF chamScale; HALF chamIsAlphaTest; #endif #endif // Hacked Shadow HALF inShadow; #endif//D_PREPASS_ENABLED // Streams: struct v2f { float4 position : POSITION_OUT; HALF4 color : COLOR0; HALF4 uv0 : TEXCOORD0; HALF4 uv1 : TEXCOORD1; float4 locCham : TEXCOORD2; // xyz == loc, w == chamBase HALF4 normalFr : TEXCOORD3; // xyz == normal, w == sand fresnel #if defined( SNOW_TOP ) || defined( SAND_TOP ) || defined( SAND_SIDE ) || defined( SNOW_FULL ) || defined( SAND_FULL ) HALF3 sandVars : TEXCOORD4; // x == windRatio, y == bleed, z == noiseFade #endif #ifdef FOG HALF4 fog : TEXCOORD5; // rgb == color, a == intensity #endif }; struct f2f { #if !defined( ALPHA ) NATIVECOLOR REGFORMAT #endif HALF4 color : FINAL_COLOR; }; //---------------------------------------------- // Program entry //---------------------------------------------- #if !defined( ALPHA ) NATIVECOLOR #endif void main( in v2f IN, out f2f OUT ) { OUT.color = IN.color; // Load a noise texture, which is useful for many things float3 noiseUv = 0.125 * IN.locCham.xyz; #ifdef D_PLATFORM_GXM half2 noiseTap = 0.0f; //D_H2_SAMPLE_WRAP_TEXTURE( noise3dSmallTex, noiseUv.xy ); #else half2 noiseTap = D_H2_SAMPLE_WRAP_TEXTURE_3D( noise3dSmallTex, noiseUv ); #endif // Load albedo textures // half3 colorTap = IN.color.rgb * D_H3_SAMPLE_WRAP_ANISO_SRGBTEXTURE( texColor, IN.uv0.xy * uvMlt.x ).rgb; half3 colorTap = IN.color.rgb * SAMPLETEX(texColor, IN.uv0.xy * uvMlt.x, ANISO, WRAP, ON).rgb; colorTap = MatrixMul( colorTap, (HALF3x3)colorCorrect ); // half alphaTap = IN.color.a * D_H4_SAMPLE_WRAP_TEXTURE( texColor, IN.uv0.xy * uvMlt.x ).a; half alphaTap = IN.color.a * SAMPLETEX(texColor, IN.uv0.xy * uvMlt.x, ANISO, WRAP, OFF).a;//D_H4_SAMPLE_WRAP_TEXTURE // AO textures are super low res, so we wonkify the UVs and posterize to add detail. float2 aoUv = IN.uv0.zw; half aoTap = D_H2_SAMPLE_WRAP_SRGBTEXTURE( texAo, aoUv ).g; aoTap = saturate( aoTap + aoStepBiasInt.y + aoStepBiasInt.z + 0.5 ); // half3 detailTap = D_H3_SAMPLE_WRAP_ANISO_SRGBTEXTURE( texDetail, IN.uv1.xy * uvMlt.z ); half3 detailTap = (half3)SAMPLETEX(texDetail, IN.uv1.xy * uvMlt.z, ANISO, WRAP, ON).rgb; // half3 rampTap = D_H3_SAMPLE_WRAP_ANISO_SRGBTEXTURE( texRamp, IN.uv1.zw * uvMlt.z ); half3 rampTap = (half3)SAMPLETEX(texRamp, IN.uv1.zw * uvMlt.z, ANISO, WRAP, ON).rgb; // Load the edge detail texture (used for transitioning between light/shadow, sand/clear, etc.) half edgeDetail = 0.25; #ifdef EDGE_DETAIL half edgeDetailTap = D_H1_SAMPLE_WRAP_TEXTURE( texEdgeMask, IN.uv0.zw * uvMlt.y * 7 ) * D_H1_SAMPLE_WRAP_TEXTURE( texEdgeMask, IN.uv0.zw * uvMlt.y * 3 ); #ifdef SNOW_TOP edgeDetailTap *= 0.5*(D_H1_SAMPLE_WRAP_TEXTURE( texEdgeMask, IN.uv0.zw * uvMlt.y * 0.3 )+1); //edgeDetailTap *= D_H1_SAMPLE_WRAP_TEXTURE( texEdgeMask, IN.uv0.zw * uvMlt.y * 19 ); #endif edgeDetail = edgeDetailTap; #endif // Swap out the color tap for the cham texture, if necessary. #ifdef CHAMELEON half3 chamTap = IN.color.rgb * D_H4_SAMPLE_WRAP_SRGBTEXTURE( texCham, IN.uv0.xy * uvMlt.x ).rgb; half chamAlphaTap = IN.color.a * D_H4_SAMPLE_WRAP_SRGBTEXTURE( texCham, IN.uv0.xy * uvMlt.x ).a; half chamMaskTap = D_H4_SAMPLE_WRAP_SRGBTEXTURE( texChamMask, IN.uv0.xy * uvMlt.z ).a; half myChamLevel=chamLevel; #ifdef CHAM_NORM myChamLevel = myChamLevel * (1.0 - (0.48 - 0.13 * chamScale) * chamIsAlphaTest) + (0.25 - 0.02 * chamScale) * chamIsAlphaTest; half chamBase = myChamLevel - IN.locCham.w; half chamScaledMaskTap = chamScale * (chamMaskTap - myChamLevel); half chamUnscaledAmount = chamBase + myChamLevel - chamScaledMaskTap; half chamAmount = saturate( (chamUnscaledAmount - 0.5) / chamScale + 0.5 ); #else half chamAmount = saturate( myChamLevel - IN.locCham.w - chamMaskTap ); #endif colorTap = lerp( colorTap, chamTap, chamAmount ); alphaTap = lerp( alphaTap, chamAlphaTap, chamAmount ); // Multiply in the chameleon colors. colorTap *= lerp( half3(1,1,1), chamColor.xyz, chamAmount ); colorTap = lerp( colorTap, chamEdgeColor.xyz, pow( 1 - 2 * abs( chamAmount - 0.5 ), 6 ) ); #endif // Calculate basic lighting half3 normal = normalize( IN.normalFr.xyz ); #if defined( SNOW_FULL ) || defined( SAND_FULL ) half sandFade = IN.sandVars.z; half3 sandNormal = 2.0 * (D_H3_SAMPLE_WRAP_TEXTURE( noiseSandTex, IN.uv0.zw * uvMlt.y * 5.0 ) - 0.5); #if defined( SNOW_FULL ) half3 lumpNormal = 2.0 * (noiseTap.xxy - 0.5); normal = normalize( 4.0 * (normal + sandFade * lumpGrainMult.x*lumpNormal) + sandFade * lumpGrainMult.y*sandNormal ); #else normal = normalize( 25.0 * normal + sandFade * sandNormal ); #endif #endif half3 eye = eyePositionWS.xyz - IN.locCham.xyz; half3 _view = normalize( eye ); half3 light = normalize( l_d.xyz ); half3 halfAngle = normalize( _view + light ); #ifdef SHADOW_MAP half3 albedo = colorTap * detailTap; #else half3 albedo = colorTap * detailTap * rampTap; #endif half3 ambientColor = D_SAMPLE_TEXTURE_CUBE( sandLoIrrCube, normal ).rgb; half3 diffuseColor = l_c.rgb; half3 specularColor = l_s.rgb; #ifdef SAND_FULL half lightIntensity = D_SAMPLE_TEXTURE_CUBE( sandLoIrrCube, normal ).a; #else half lightIntensity = dot( normal, light ); #endif #ifdef SHADOW_MAP lightIntensity = min( rampTap.r-0.25, lightIntensity ); #endif #if !defined( SNOW_FULL ) && !defined( SAND_FULL ) // Filter the light through the edge detail texture to give it a hard jagged border half lightMask = 1.5 * edgeDetail - 0.25; lightIntensity = saturate( (lightIntensity + lightMask) * 20 ); #endif half diffuseIntensity = saturate( lightIntensity - inShadow ); half specularIntensity = 0; #ifdef SPECULAR half specMult = specular.x; half specGlossMult = specular.y + 0.001; half F0 = specular.z; // usually 0.025 specularIntensity = saturate( lightIntensity - saturate( inShadow ) ); // Calculate Fresnel. half fresnelT = pow( saturate( 1.0 - dot( _view, halfAngle ) ), 5.0 ); half fresnel = F0 * (1.0 - fresnelT) + fresnelT; half gloss = specGlossMult; half specPow = pow( 256.0, gloss ) - 1.0; specularIntensity *= fresnel * specMult * (specPow + 8.0)/25.0 * pow( saturate( dot( normal, halfAngle ) ), specPow ); #endif // Generate a mask that represents a layer of sand that settled on the mesh half sandIntensity = 0.0; #if defined( SNOW_TOP ) || defined( SAND_TOP ) half windRatio = IN.sandVars.x; half bleed = IN.sandVars.y; sandIntensity = saturate( (windRatio - edgeDetail) / bleed ); #endif #if defined( SAND_FULL ) sandIntensity = 1.0; #endif // Generate another mask that represents the sand piling up on the side of the mesh. half sideIntensity = 0; #if defined( SAND_SIDE ) float2 heightUV = (float2( IN.locCham.x, IN.locCham.z ) + heightBiasUv.xy) * heightScaleUv.xy; half heightTap = D_H1_SAMPLE_TEXTURE( heightTexture, heightUV ); float duneHeight = heightBiasY + (float)duneHeightOff + (float)heightTap; half blendThreshold = 2.22 * (duneHeight - IN.locCham.y); sideIntensity = saturate( blendThreshold - edgeDetail * 2.666 ); sideIntensity *= sideIntensity; #endif #if defined( SNOW_TOP ) || defined( SAND_TOP ) || defined( SAND_SIDE ) // Calculate sand values. half3 Vn = _view; half3 Nn = normalize( IN.normalFr.xyz ); // Read the sand grain texture. half sandNoise = 0; #if defined( SAND_DETAIL ) float2 sandUV = IN.uv0.zw * uvMlt.y * 5 + sandBias.xy * sandScale.xy; sandNoise = 2.0 * (D_H1_SAMPLE_POINT_WRAP_ANISO_TEXTURE( sandFastTexture, sandUV ) - 0.5); //sandNoise = 2.0 * (sandFastTexture.SampleLevel(PointWrapAnisoSampler, sandUV, 0.0 ).x - 0.5); //sandNoise *= lod; #endif // Load the dune color. const float terrainScale = 0.5; float2 duneUv = float2( 1 - (terrainScale * IN.locCham.x + 0.5) / 256, (terrainScale * IN.locCham.z + 0.5) / 512 ); half3 duneTap = (half3)SAMPLETEX(duneTexture, duneUv, ANISO, CLAMP, ON).rgb;//D_H3_SAMPLE_SRGBTEXTURE( duneTexture, duneUv ); //duneTap = pow(duneTap,2.2f); // Load the pre-lit dune color and velvet. float2 litUV = (float2( IN.locCham.x, IN.locCham.z ) + heightBiasUv.xy) * heightScaleUv.xy; litUV -= float2(1.0f/ 256.0f, 0.0f); half4 litTap = D_H4_SAMPLE_TEXTURE( duneColorTexture, litUV ); half3 litColor = 4.0 * litTap.rgb * litTap.rgb; half velvDune = litTap.a; half velvMesh = saturate( 1.12 - abs( dot( Vn, 4.0 * Nn ) ) ); velvDune *= 0.333 * sandNoise; velvMesh *= 0.333 + 0.333 * sandNoise; #if defined( SNOW_TOP ) velvMesh = 0.0; #endif half3 duneColor = (1.0 + velvMesh) * duneTap; half3 duneLitColor = (1.0 + velvDune) * litColor; // There are certain cases where it's better to calculate the dune // shader, instead of loading from a texture. #ifdef SAND_FANCY { half3 colorShadowTapAlpha = SAMPLETEX(duneTexture, duneUv, ANISO, CLAMP, OFF).a; half3 _duneColor = SAMPLETEX(duneTexture, duneUv, ANISO, CLAMP, ON).rgb;//D_H4_SAMPLE_SRGBTEXTURE( duneTexture, duneUv ); half shadow = saturate( 10 * (colorShadowTapAlpha - 0.25) ); half nx = 0; half nz = 0; #if defined( SAND_DETAIL ) nx = 2.0 * (D_H1_SAMPLE_POINT_WRAP_ANISO_TEXTURE( sandFastTexture, sandUV + 0.000 ) - 0.5); nz = 2.0 * (D_H1_SAMPLE_POINT_WRAP_ANISO_TEXTURE( sandFastTexture, sandUV + 0.125 ) - 0.5); #endif half3 _Nn = half3( 0.0, 1.0, 0.0 ); half3 Nnt = 25.0 * _Nn + half3( nx, 0, nz ); half3 Nnv = 4.0 * _Nn + half3( nx, 0, nz ); half4 lightCubeTap = D_SAMPLE_TEXTURE_CUBE( sandHiIrrCube, Nnt ); half diffuseInt = lightCubeTap.a; half3 fillColor = lightCubeTap.rgb; half velv = saturate( 1 - (abs( dot( Vn, Nnv ) ) - 0.12) ); _duneColor *= 1 + 0.333 * velv; half diffuseMult = shadow * diffuseInt; duneLitColor = _duneColor * (l_c.rgb * diffuseMult + fillColor); } #endif #endif // Calculate snow/sand specular. #if defined( SNOW_FULL ) || defined( SAND_FULL ) half3 Nns = normalize( 2.0 * normal + sandFade * sandNormal ); half specLight = pow( saturate( dot( halfAngle, Nns ) ), l_s.w ); half spec = sandFade * IN.normalFr.w * specLight; half velv = velvetInt * pow( 1 - abs( dot( _view, normalize(Nns+0.25*_view) ) ), velvetRatio ); specularIntensity = sandIntensity * (1.0 + sparkleHint) * min( saturate( lightIntensity ), diffuseIntensity ) * (spec + velv); #endif // Perform lighting and sand blending. #if defined( SNOW_TOP ) || defined( SAND_TOP ) // The actual surface color is a combination of base material and sand. albedo = lerp( albedo, duneColor, sandIntensity ); #endif // We have a weird hack where we fold AO into albedo instead of just multiplying it by the ambient lighting albedo = lerp( albedo * aoTap, albedo, saturate( diffuseIntensity - 0.65 ) ); // Apply texturing and lighting OUT.color.rgb = albedo * (diffuseIntensity * diffuseColor + ambientColor); #ifdef SAND_SIDE // Sand accumulated on the side of the mesh completely covers up all other lighting. OUT.color.rgb = lerp( OUT.color.rgb, duneLitColor, sideIntensity ); #endif OUT.color.rgb += albedo * l_s.rgb * specularIntensity; #ifdef FOG OUT.color.rgb = lerp( OUT.color.rgb, IN.fog.rgb, IN.fog.a ); #endif OUT.color.a = alphaTap; #if defined( ALPHA ) OUT.color.a *= opacity; // Fading at extreme angles tends to look better for objects using this shader. OUT.color.a *= saturate( 16.0 * abs( dot( _view, normal ) ) ); #else #if 1 || defined( DITHER_OUT ) // If we end up not using the noise tex for anything else, we can switch to this slightly faster function. //half fade = dot( frac( IN.locCham.xyz ), float3( 1.0/3.0 ) ); OUT.color.a = (opacity >= noiseTap.r) ? OUT.color.a : 0; #endif //OUT.color.rgb = aoTap; #if defined( PREPASS ) OUT.color.rgb = 1; #else // If this pixel isn't alphaed out, encode the amount of direct light hitting it in the alpha channel. OUT.color.a = OUT.color.a > 0.5 ? 1.0 + aoTap : OUT.color.a; #endif #endif #ifdef ALPHATESTENABLE clip(OUT.color.a-0.5f); #endif #ifdef ALPHATESTENABLE1 clip(OUT.color.a-(1.0/255.0)); #endif } // ------------------------------------------------------------------------------------------------------------------------------------------ #undef main #undef IN #undef OUT #undef v2f #undef f2f // ===================================================================================================================[TECHNIQUE CODE END]=== #if !defined(D_PLATFORM_GXM) #ifndef __ORBIS__ technique11 Opaque { pass pass0 { SetVertexShader( CompileShader( vs_5_0, Opaque_vs_main() ) ); SetPixelShader( CompileShader( ps_5_0, Opaque_fs_main() ) ); SetBlendState(ourBlendState, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF); SetDepthStencilState(ourDepthStencilState,0); SetRasterizerState(ourRasterState); } } #endif #else technique Opaque { pass pass0 { VertexProgram = compile arbvp1 Opaque_vs_main(); FragmentProgram = compile arbfp1 Opaque_fs_main(); } } #endif D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx*@ 1DITHER_OUTEDGE_DETAILSAND_FANCYSAND_SIDESHADOW_MAPSPECULARUV_OFFSET@*GGGGGGGG€?€?€?€?€?€A€A€? X €05spDXBCž9‚õÊê`+Z–ˆºwlX 8Ø ¬ à ´$P%RDEF˜ è<ÿÿAo RD11< ($  / A Sjÿÿÿÿ zÿÿÿÿ ƒÿÿÿÿ �ÿÿÿÿ •ÿÿÿÿ ›ÿÿÿÿ § ÿÿÿÿ µ ÿÿÿÿ Ãÿÿÿÿ Ñÿÿÿÿ  ÝLinearClampSamplerLinearWrapSamplerAnisoClampSamplerLinearWrapAnisoSamplernoise3dSmallTextexColortexDetailtexRamptexAotexEdgeMasksandLoIrrCubesandHiIrrCubeheightTextureduneTexture$Globals««Ý€°ÌÿÿÿÿÿÿÿÿðÌÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ< ÿÿÿÿÿÿÿÿJ0@\ÿÿÿÿÿÿÿÿ€p@\ÿÿÿÿÿÿÿÿˆ°@\ÿÿÿÿÿÿÿÿ–ð@\ÿÿÿÿÿÿÿÿ�0ÿÿÿÿÿÿÿÿ¡@ÿÿÿÿÿÿÿÿ¦Pÿÿÿÿÿÿÿÿ¯`ÿÿÿÿÿÿÿÿ³pÿÿÿÿÿÿÿÿ·€Ìÿÿÿÿÿÿÿÿ¿„ÌÿÿÿÿÿÿÿÿɈÌÿÿÿÿÿÿÿÿÕŒÌÿÿÿÿÿÿÿÿÙ�@\ÿÿÿÿÿÿÿÿæÐÿÿÿÿÿÿÿÿïàÿÿÿÿÿÿÿÿùðÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿ Ìÿÿÿÿÿÿÿÿ Ìÿÿÿÿÿÿÿÿ. ÿÿÿÿÿÿÿÿ< 0ÿÿÿÿÿÿÿÿI @ÿÿÿÿÿÿÿÿW Pÿÿÿÿÿÿÿÿ` `ÿÿÿÿÿÿÿÿf pÌÿÿÿÿÿÿÿÿcameraNearTimesFarfloat«««ÃcameraFarMinusNearcameraNearFarfloat4eyePositionWSmodelfloat4x4«««PmodelITmodelViewProjmodelIl_dwinduvOffsetl_cl_sopacityvelvetIntvelvetRatiolodcolorCorrectsandBiassandScaleheightBiasUvheightScaleUvheightBiasYduneHeightOffaoStepBiasIntlocalDudePosremoteDudePosspecularuvMltinShadowMicrosoft (R) HLSL Shader Compiler 10.1«ISGN̰¼ÂÂÂÂÂSV_POSITIONCOLORTEXCOORD«OSGN, SV_TARGET««SHEXÌPsjˆYFŽ (Z` Z` Z` Z`X(pUUXpUUXpUUXpUUXpUUXpUUX0pUUX0pUUXpUUXp UUbòbòbòbrbreò h 6@ÍÌ @8 â@>>>E‹B€CU"–~` 6"8€ &E‹Â€CUræ F~`/rF8rFrF8rFF8rF‚ 8²VFˆ ²F F8r¦ F‚ rFF8€ &E‹Â€CUBæ F{`8B*:E‹Â€CU‚æ†w` /‚:8‚:@ÍÌ @‚:‚:€ "‚:*€ "‚:@?4‚:@3‚:@€?82F¦Š &E‹Â€CUrFF~`/rF8rFrF82榊 &E‹Â€CU‚F–s`/‚:8‚ :‚:82æV… &+Â@82æ FE‹Â€CU‚F–s` 82æV… &+Â@82æ FE‹Â€CUFF~` 8‚: 6‚:FFD 8rF6rF€ArFF‚ ‚FFD‚:8röF ‚F‚ F‚ D‚:8röF‚ rFF‚FFD‚:8röF8rFFE‹‚€CUrFF~` /rF8 rF@ÍÌ @ÍÌ @ÍÌ @rF6rF‚ ‚FF6‚@€¾‚::3‚::8‚:@À?6‚@€¾‚::‚::+‚@8‚::4‚:@3‚:@€?6‚ € €A'‚::4‚:@3‚:@€?6‚ € %€ %@oƒ:6"*€ %4B € '@3B*@€?6B*€A‚:*4‚:@3‚:@€?BFF6B*€AB*@€?4B*@3B*@€?6‚@€?8‚*:8B**8B**8B*:6‚*€A‚:@€?8":"*6 /B@€C8*  6B@€¿* 8‚:" @A8‚:‚:@ÈAFF4 @3 @€?/ 8   8 :8‚: 2†F€ 82FF€ E‹Â€CUFF~` 6  "€ ! € ! 6"€A 8 @{@8‚:@¾Ÿ*@6‚:€A‚: 4‚:@3‚:@€?8‚::6rF6@?+"@8B  B*@?+‚@B*:6B*€A*8 * @?+"@" E‹Â€CUF6y ` 6 E‹Â€CUrFF~ ` /rF8rFrF+@ 6"@€¾ 8  4 @3 @€?+@+B@6r@€?8 rF@ÈAÈAÈA+"@rFF8 rF@€@€@€@+"@R " E‹‚€CUrFF~` /rF8 rF@ÍÌ @ÍÌ @ÍÌ @rFE‹‚€CU‚FF~` 6‚:6‚:6rF+‚@FF 6" €A4 6"@�Âõ½ 6 €A :4 @3 @€?+"@8 @ú~ª> 8rF8 :8rF‚ rFF8rFF8röF6@ff&¿ :4 @3 @€?6rF€ArFF8rFrFF8rFörFF8rFF6rF€ArFF8röFrFF8rFF‚ 8röFr FF6B* € +"@7  *1"@? B:@€?7 ‚ * >STAT”ä ´SPDBæMicrosoft C/C++ MSF 7.00 DSsìpÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ8þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ <ÿÿÿÿ”.1TŒ^Ù¥dSç©H–7dzdÏÂ=ÜQ3a [ 0 ] = ONE ; DestBlendAlpha [ 0 ] = ONE ; BlendOpAlpha [ 0 ] = ADD ; RenderTargetWriteMask [ 0 ] = 15 ; AlphaToCoverageEnable = false ; } ; DepthStencilState ourDepthStencilState { DepthEnable = true ; DepthFunc = less ; StencilEnable = false ; } ; RasterizerState ourRasterState { CullMode = None ; DepthBias = 0.0f ; ScissorEnable = false ; MultiSampleEnable = false ; DepthClipEnable = false ; AntialiasedLineEnable = false ; } ; ÆZL说©ë°Î½é�dP…h&uƒ’æÈQÁ!A¹A$5®lN8öʳ9ÎgŸÝÖšVU¢þäÇjuÎâ£#line 1 "D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Mesh_vs__Mesh_fs__50025.fx" #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #line 11 BlendState ourBlendState { BlendEnable [ 0 ] = FALSE ; BlendEnable [ 1 ] = FALSE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = ONE ; DestBlendAlpha [ 0 ] = ONE ; BlendOpAlpha [ 0 ] = ADD ; RenderTargetWriteMask [ 0 ] = 15 ; AlphaToCoverageEnable = false ; } ; DepthStencilState ourDepthStencilState { DepthEnable = true ; DepthFunc = less ; StencilEnable = false ; } ; RasterizerState ourRasterState { CullMode = None ; DepthBias = 0.0f ; ScissorEnable = false ; MultiSampleEnable = false ; DepthClipEnable = false ; AntialiasedLineEnable = false ; } ; #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 8 #line 16 #line 20 #line 135 #line 140 #line 147 BlendState NoBlend_BlendState { BlendEnable [ 0 ] = FALSE ; } ; BlendState Alpha_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = Src_Alpha ; DestBlendAlpha [ 0 ] = Inv_Src_Alpha ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; BlendState Additive_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = ONE ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = Src_Alpha ; DestBlendAlpha [ 0 ] = ONE ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; #line 180 BlendState ParticleBlended_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = ONE ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = ONE ; DestBlendAlpha [ 0 ] = Inv_Src_Alpha ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; DepthStencilState NoDepthTest_NoDepthWrite_DepthState { DepthEnable = FALSE ; DepthWriteMask = Zero ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState NoDepthTest_DepthWrite_DepthState { DepthEnable = FALSE ; DepthWriteMask = All ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState DepthTest_NoDepthWrite_DepthState { DepthEnable = TRUE ; DepthWriteMask = Zero ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState DepthTest_DepthWrite_DepthState { DepthEnable = TRUE ; DepthWriteMask = All ; DepthFunc = Less ; StencilEnable = FALSE ; } ; RasterizerState NoCull_RasterizerState { CullMode = None ; } ; RasterizerState BackFaceCull_RasterizerState { CullMode = Back ; FrontCounterClockwise = TRUE ; } ; RasterizerState FrontFaceCull_RasterizerState { CullMode = Front ; FrontCounterClockwise = TRUE ; } ; #line 243 #line 246 #line 264 #line 269 sampler PointClampSampler : register ( s8 ) { Filter = Min_Mag_Mip_Point ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; } ; sampler LinearClampSampler : register ( s9 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; } ; sampler LinearWrapTSampler : register ( s10 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Clamp ; AddressV = Wrap ; AddressW = Clamp ; } ; sampler LinearWrapSampler : register ( s11 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; } ; sampler PointWrapSampler : register ( s12 ) { Filter = Min_Mag_Mip_Point ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; } ; sampler AnisoClampSampler : register ( s13 ) { Filter = ANISOTROPIC ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; MaxAnisotropy = 16 ; } ; sampler LinearWrapAnisoSampler : register ( s14 ) { Filter = ANISOTROPIC ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; MaxAnisotropy = 16 ; } ; sampler PointWrapAnisoSampler : register ( s15 ) { Filter = Min_Mag_Point_Mip_Linear ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; MaxAnisotropy = 16 ; } ; static const float kSRGB = 2.2f ; #line 358 #line 373 #line 408 #line 427 #line 435 #line 498 #line 516 #line 521 float cameraNearTimesFar ; float cameraFarMinusNear ; float4 cameraNearFar ; #line 527 float ConvertDepth ( float depth ) { #line 532 float viewSpaceZ = - ( cameraNearTimesFar / ( depth * cameraFarMinusNear - cameraNearFar . y ) ) ; return viewSpaceZ ; } #line 587 #line 592 static const float4x4 SCALE_BIAS = float4x4 ( float4 ( 0.5 , 0.0 , 0.0 , 0.5 ) , float4 ( 0.0 , - 0.5 , 0.0 , 0.5 ) , #line 598 float4 ( 0.0 , 0.0 , 0.5 , 0.5 ) , float4 ( 0.0 , 0.0 , 0.0 , 1.0 ) ) ; #line 613 #line 635 #line 642 #line 60 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" float4 eyePositionWS : eyePositionWS ; #line 65 float4x4 model : model ; float4x4 modelIT : modelit ; float4x4 modelViewProj : modelviewproj ; float4x4 modelI : modeli ; #line 81 float4 l_d ; float4 wind ; #line 88 #line 92 float4 uvOffset ; #line 101 #line 130 struct Opaque_vs_a2v { #line 136 float3 Position : POSITION ; float3 normal : NORMAL ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; } ; #line 164 #line 168 struct Opaque_vs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; float4 locCham : TEXCOORD2 ; float4 normalFr : TEXCOORD3 ; float3 sandVars : TEXCOORD4 ; #line 181 } ; #line 187 void Opaque_vs_main ( #line 190 in Opaque_vs_a2v Opaque_vs_IN , out Opaque_vs_v2f Opaque_vs_OUT ) { #line 200 float3 worldPos = mul ( float4 ( Opaque_vs_IN . Position . xyz , 1.0f ) , model ) . xyz ; Opaque_vs_OUT . position = mul ( float4 ( Opaque_vs_IN . Position . xyz , 1.0f ) , modelViewProj ) ; float3 worldNorm = normalize ( mul ( Opaque_vs_IN . normal , ( float3x3 ) modelIT ) ) ; Opaque_vs_OUT . color . rgb = Opaque_vs_IN . color . rgb ; Opaque_vs_OUT . color . a = Opaque_vs_IN . color . a ; Opaque_vs_OUT . uv0 = Opaque_vs_IN . uv0 ; Opaque_vs_OUT . uv1 = Opaque_vs_IN . uv1 ; Opaque_vs_OUT . uv0 += uvOffset . xyxy ; Opaque_vs_OUT . uv1 += uvOffset . xyxy ; Opaque_vs_OUT . locCham . xyz = worldPos ; #line 231 Opaque_vs_OUT . normalFr . xyz = worldNorm ; Opaque_vs_OUT . normalFr . w = 0 ; #line 245 float windForce = min ( ( length ( wind . xyz ) - 10 ) / 70 , 1.0 ) ; #line 252 float windRatio = saturate ( worldNorm . y ) * .65 ; float bleed = lerp ( 0.5 , 0.05 , windForce ) ; float depth = length ( eyePositionWS . xyz - worldPos ) ; float noiseFade = saturate ( 1.5 - depth * 0.02 ) ; Opaque_vs_OUT . sandVars = float3 ( windRatio , bleed , noiseFade ) ; #line 283 } #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 642 #line 301 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #line 308 #line 312 #line 317 Texture3D < float4 > noise3dSmallTex ; #line 325 #line 328 float4 l_c , l_s ; #line 331 float opacity ; float velvetInt , velvetRatio ; #line 336 float lod ; #line 339 float4x4 colorCorrect ; #line 342 Texture2D < float4 > texColor ; Texture2D < float4 > texDetail ; Texture2D < float4 > texRamp ; #line 347 Texture2D < float4 > texAo ; #line 350 Texture2D < float4 > texEdgeMask ; #line 353 Texture2D < float4 > sandFastTexture ; TextureCube < float4 > sandLoIrrCube ; TextureCube < float4 > sandHiIrrCube ; float4 sandBias ; float4 sandScale ; Texture2D < float4 > heightTexture ; float4 heightBiasUv ; float4 heightScaleUv ; float heightBiasY ; Texture2D < float4 > duneTexture ; Texture2D < float4 > duneColorTexture ; float duneHeightOff ; #line 373 #line 376 float4 aoStepBiasInt ; #line 379 float4 localDudePos ; float4 remoteDudePos ; float4 specular ; float4 uvMlt ; #line 400 #line 403 float inShadow ; #line 411 struct Opaque_fs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; float4 locCham : TEXCOORD2 ; float4 normalFr : TEXCOORD3 ; float3 sandVars : TEXCOORD4 ; #line 424 } ; struct Opaque_fs_f2f { float4 color : SV_TARGET0 ; } ; #line 438 void Opaque_fs_main ( in Opaque_fs_v2f Opaque_fs_IN , out Opaque_fs_f2f Opaque_fs_OUT ) { Opaque_fs_OUT . color = Opaque_fs_IN . color ; #line 446 float3 noiseUv = 0.125 * Opaque_fs_IN . locCham . xyz ; #line 449 float2 noiseTap = noise3dSmallTex . Sample ( LinearWrapSampler , noiseUv ) . xy ; #line 455 float3 colorTap = Opaque_fs_IN . color . rgb * pow ( texColor . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv0 . xy * uvMlt . x ) , kSRGB ) . rgb ; colorTap = mul ( ( float3x3 ) colorCorrect , colorTap ) ; #line 460 float alphaTap = Opaque_fs_IN . color . a * texColor . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv0 . xy * uvMlt . x ) . a ; #line 463 float2 aoUv = Opaque_fs_IN . uv0 . zw ; float aoTap = pow ( texAo . Sample ( LinearWrapSampler , aoUv ) . xy , 2.2f ) . g ; aoTap = saturate ( aoTap + aoStepBiasInt . y + aoStepBiasInt . z + 0.5 ) ; #line 468 float3 detailTap = ( float3 ) pow ( texDetail . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv1 . xy * uvMlt . z ) , kSRGB ) . rgb ; #line 471 float3 rampTap = ( float3 ) pow ( texRamp . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv1 . zw * uvMlt . z ) , kSRGB ) . rgb ; #line 474 float edgeDetail = 0.25 ; float edgeDetailTap = texEdgeMask . Sample ( LinearWrapSampler , Opaque_fs_IN . uv0 . zw * uvMlt . y * 7 ) . x * texEdgeMask . Sample ( LinearWrapSampler , Opaque_fs_IN . uv0 . zw * uvMlt . y * 3 ) . x ; #line 480 edgeDetail = edgeDetailTap ; #line 507 #line 510 float3 normal = normalize ( Opaque_fs_IN . normalFr . xyz ) ; #line 520 float3 eye = eyePositionWS . xyz - Opaque_fs_IN . locCham . xyz ; float3 _view = normalize ( eye ) ; float3 light = normalize ( l_d . xyz ) ; float3 halfAngle = normalize ( _view + light ) ; float3 albedo = colorTap * detailTap ; #line 529 float3 ambientColor = float4 ( pow ( sandLoIrrCube . Sample ( LinearClampSampler , normal ) . xyz , 2.2f ) , sandLoIrrCube . Sample ( LinearClampSampler , normal ) . a ) . rgb ; float3 diffuseColor = l_c . rgb ; float3 specularColor = l_s . rgb ; #line 536 float lightIntensity = dot ( normal , light ) ; lightIntensity = min ( rampTap . r - 0.25 , lightIntensity ) ; float lightMask = 1.5 * edgeDetail - 0.25 ; lightIntensity = saturate ( ( lightIntensity + lightMask ) * 20 ) ; float diffuseIntensity = saturate ( lightIntensity - inShadow ) ; float specularIntensity = 0 ; float specMult = specular . x ; float specGlossMult = specular . y + 0.001 ; float F0 = specular . z ; specularIntensity = saturate ( lightIntensity - saturate ( inShadow ) ) ; #line 559 float fresnelT = pow ( saturate ( 1.0 - dot ( _view , halfAngle ) ) , 5.0 ) ; float fresnel = F0 * ( 1.0 - fresnelT ) + fresnelT ; float gloss = specGlossMult ; float specPow = pow ( 256.0 , gloss ) - 1.0 ; specularIntensity *= fresnel * specMult * ( specPow + 8.0 ) / 25.0 * pow ( saturate ( dot ( normal , halfAngle ) ) , specPow ) ; #line 569 float sandIntensity = 0.0 ; #line 574 #line 577 #line 580 float sideIntensity = 0 ; float2 heightUV = ( float2 ( Opaque_fs_IN . locCham . x , Opaque_fs_IN . locCham . z ) + heightBiasUv . xy ) * heightScaleUv . xy ; float heightTap = heightTexture . Sample ( LinearClampSampler , heightUV ) . x ; float duneHeight = heightBiasY + ( float ) duneHeightOff + ( float ) heightTap ; float blendThreshold = 2.22 * ( duneHeight - Opaque_fs_IN . locCham . y ) ; sideIntensity = saturate ( blendThreshold - edgeDetail * 2.666 ) ; sideIntensity *= sideIntensity ; float3 Vn = _view ; float3 Nn = normalize ( Opaque_fs_IN . normalFr . xyz ) ; #line 596 float sandNoise = 0 ; #line 602 #line 605 const float terrainScale = 0.5 ; float2 duneUv = float2 ( 1 - ( terrainScale * Opaque_fs_IN . locCham . x + 0.5 ) / 256 , ( terrainScale * Opaque_fs_IN . locCham . z + 0.5 ) / 512 ) ; float3 duneTap = ( float3 ) pow ( duneTexture . Sample ( AnisoClampSampler , duneUv ) , kSRGB ) . rgb ; #line 611 float2 litUV = ( float2 ( Opaque_fs_IN . locCham . x , Opaque_fs_IN . locCham . z ) + heightBiasUv . xy ) * heightScaleUv . xy ; litUV -= float2 ( 1.0f / 256.0f , 0.0f ) ; float4 litTap = duneColorTexture . Sample ( LinearClampSampler , litUV ) ; float3 litColor = 4.0 * litTap . rgb * litTap . rgb ; float velvDune = litTap . a ; float velvMesh = saturate ( 1.12 - abs ( dot ( Vn , 4.0 * Nn ) ) ) ; velvDune *= 0.333 * sandNoise ; velvMesh *= 0.333 + 0.333 * sandNoise ; #line 621 float3 duneColor = ( 1.0 + velvMesh ) * duneTap ; float3 duneLitColor = ( 1.0 + velvDune ) * litColor ; #line 628 { float3 colorShadowTapAlpha = duneTexture . Sample ( AnisoClampSampler , duneUv ) . a ; float3 _duneColor = pow ( duneTexture . Sample ( AnisoClampSampler , duneUv ) , kSRGB ) . rgb ; float shadow = saturate ( 10 * ( colorShadowTapAlpha - 0.25 ) ) ; float nx = 0 ; float nz = 0 ; #line 639 float3 _Nn = float3 ( 0.0 , 1.0 , 0.0 ) ; float3 Nnt = 25.0 * _Nn + float3 ( nx , 0 , nz ) ; float3 Nnv = 4.0 * _Nn + float3 ( nx , 0 , nz ) ; float4 lightCubeTap = float4 ( pow ( sandHiIrrCube . Sample ( LinearClampSampler , Nnt ) . xyz , 2.2f ) , sandHiIrrCube . Sample ( LinearClampSampler , Nnt ) . a ) ; float diffuseInt = lightCubeTap . a ; float3 fillColor = lightCubeTap . rgb ; float velv = saturate ( 1 - ( abs ( dot ( Vn , Nnv ) ) - 0.12 ) ) ; _duneColor *= 1 + 0.333 * velv ; float diffuseMult = shadow * diffuseInt ; duneLitColor = _duneColor * ( l_c . rgb * diffuseMult + fillColor ) ; } #line 666 #line 672 #line 675 albedo = lerp ( albedo * aoTap , albedo , saturate ( diffuseIntensity - 0.65 ) ) ; #line 678 Opaque_fs_OUT . color . rgb = albedo * ( diffuseIntensity * diffuseColor + ambientColor ) ; Opaque_fs_OUT . color . rgb = lerp ( Opaque_fs_OUT . color . rgb , duneLitColor , sideIntensity ) ; Opaque_fs_OUT . color . rgb += albedo * l_s . rgb * specularIntensity ; #line 689 Opaque_fs_OUT . color . a = alphaTap ; #line 696 #line 700 Opaque_fs_OUT . color . a = ( opacity >= noiseTap . r ) ? Opaque_fs_OUT . color . a : 0 ; #line 705 Opaque_fs_OUT . color . a = Opaque_fs_OUT . color . a > 0.5 ? 1.0 + aoTap : Opaque_fs_OUT . color . a ; #line 712 #line 715 } technique11 Opaque { pass pass0 { SetVertexShader ( CompileShader ( vs_5_0 , Opaque_vs_main ( ) ) ) ; SetPixelShader ( CompileShader ( ps_5_0 , Opaque_fs_main ( ) ) ) ; SetBlendState ( ourBlendState , float4 ( 0.0f , 0.0f , 0.0f , 0.0f ) , 0xFFFFFFFF ) ; SetDepthStencilState ( ourDepthStencilState , 0 ) ; SetRasterizerState ( ourRasterState ) ; } } #line 747 þïþï&BD:\Dev\TGC\Journey\head\Journey\shaderd:\dev\tgc\journey\head\journey\shader#line 1 "D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Mesh_vs__Mesh_fs__50025.fx" #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #line 11 BlendState ourBlendState { BlendEnable [ 0 ] = FALSE ; BlendEnable [ 1 ] = FALSE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlphâ0€ø#…†¾ÊÕ)(â0ÕOΰA()B< ºG ºGMicrosoft (R) HLSL Shader Compiler 10.1Æ=hlslFlags0x4005hlslTargetps_5_0hlslEntryOpaque_fs_mainhlslDefines /DSAND_SIDE=1 /DEDGE_DETAIL=1 /DSPECULAR=1 /DUV_OFFSET=1 /DSHADOW_MAP=1 /DDITHER_OUT=1 /DSAND_FANCY=1 /DPHYRE_D3DFX=16 ��< Opaque_fs_main2> Opaque_fs_INP<�P<�P<�P <� P<�P<�P<�P<�P <� P$<�$P(<�(P,<�,P0<�0P4<�4P8<�8P<<�<P@<�@PD<�DPH<�HPL<�LPP<�PPT<�TPX<�XP\<�\P`<�`Pd<�dPh<�h6> Opaque_fs_OUTP<�P<�P<�P <� P<Ä P<Ä$P<Ä(P XP l\.>noiseUvPx,Px`Px` .> noiseTapP¸.>colorTapPd@XPd@XPd.>@alphaTapPd@.>@aoTapPÔø t 2>detailTapPø¨ Pø¨$Pø¨(.>rampTapPˆÌ2>@edgeDetailPÈL ,6>@edgeDetailTapP´` ,.>normalP 0Pô4Pà 8*>eyePLL@PLLDPLLH.>_viewP˜´ @P˜Ì DP˜ìH.>lightPðøPPðTPð0X2>halfAnglePX `PX dPX h.>albedoPtT<8PtT<8PtT<82>ambientColorPð0 Pð0$Pð0(2>diffuseColorP ÄpP ÄtP Äx6>@lightIntensityP$ L<Pp hh2>@lightMaskP¼ 0<6>@diffuseIntensityP° <:>@specularIntensityP¨ $.>@specMultPÈ üL6>@specGlossMultPè |P*>@F0P T.>@fresnelTP´ ”X.>@fresnelP ÀT.>@glossP4 0P.>@specPowP¨ ÌP6>@sideIntensityP€L ,.> heightUVP(,0P(d42>@heightTapPh@02>@duneHeightP¨406>@blendThresholdPøÌ0*>VnP°œ@P°´DP°ÔH2> terrainScalePÄÌ0.> duneUvPtÔPPÜlT2>duneLitColorPøx0Pøx4Pøx8:>colorShadowTapAlphaP02>_duneColorPŒøPPŒøTPŒøXP„�@P„�DP„�H.>@shadowP$|*>@nxP8,0*>@nzPL8*>_NnPl€`Pl€dPl€h*>NntPÄ€PÄ„PĈ*>NnvP°�P°˜P8””2>lightCubeTapP´(0P´(4P´(8P ôØL2>@diffuseIntPÄL2>fillColorPÀ0PÀ4PÀ8*>@velvP0@2>@diffuseMultP ˆ.> kSRGBPPPR ÿÿÿÿÿÿkSRGBô0@bôïn~·0:{’Ð#PA¢AìAò„Ì($<[€<[ ÆTP¾€P¾x€x¤€¤Â¸Ç€¸ÇØÇ€ØÇÇ€ÇÇ€Ç4Ç€4ÇHÇ€HÇdÉ€dɄɀ„ɤɀ¤ÉÀÉ€ÀÉàÉ€àÉüÌ€üÌÌ€ÌHÌ€HÌdЀdÐ�Ѐ�ФЀ¤ÐÀЀÀÐÔÑ€ÔÑôÑ€ôÑÑ€Ñ0Ñ€0ÑLÑ€LÑhÔ€hÔˆÔ€ˆÔ´Ô€´ÔÈÔ€ÈÔäÔ€äÔø×€ø××€×D×€D×X×€X×t×€t׈܀ˆÜ¨Ü€¨ÜÈÜ€ÈÜäÜ€äÜÜ€Ü0Ü€0ÜPÜ€PÜlÜ€lܘ܀˜Ü´á€´áÈþ€Èþäþ€äþøþ€øþ € , €, L €L h €h | €| ˜ €˜ ¼ €¼ Ð €Ð ð €ð   €  ( €( < €< X€Xt€t € ´€´Ü€Üð€ð € $ €$ 8 €8 T €T p €p Œ €Œ   €  ¼ !€¼ !Ø !€Ø !ì !€ì ! !€ !$ !€$ !@ $€@ $\ $€\ $x $€x $” $€” $° (€° (È )€È )è *€è * ,€ , ,€ ,< ,€< ,T ,€T ,p ,€p ,Œ ,€Œ ,¨ /€¨ /Ä /€Ä /Ü /€Ü /ø /€ø / /€ /0 /€0 /D /€D /` /€` /| /€| /˜ /€˜ /´ 0€´ 0Ì 0€Ì 0è 0€è 0 0€ 0 2€ 24 3€4 3H 3€H 3d 3€d 3x 3€x 3Œ 3€Œ 3¨ 5€¨ 5Ä 5€Ä 5à 5€à 5ü 5€ü 55€545€45P5€P5l5€l5€5€€5œ5€œ5°5€°5Ì5€Ì5èF€èFF€F(G€(GTG€TGhH€hHŒH€ŒH¨I€¨IÀI€ÀIÜI€ÜIøJ€øJJ€J,J€,JHJ€HJdJ€dJ€K€€KœP€œP°]€°]Ä^€Ä^Ø^€Ø^ô^€ô^^€^$^€$^@^€@^X^€X^t^€t^�^€�^¬^€¬^À^€À^Üv€Üvv€vw€wHw€Hw\w€\wxw€xwŒx€Œx x€ x´x€´xÐx€Ðxìx€ìxx€x$z€$z8{€8{L�€L�l‚€l‚”‚€”‚¨‚€¨‚ă€Äƒìƒ€ìƒƒ€ƒƒ€ƒ8…€8…d…€d…x…€x… …€ …´…€´…à…€à…ô†€ô†‡€‡‰€‰0‰€0‰L‰€L‰d‰€d‰€‰€€‰”‰€”‰°‰€°‰È‰€È‰ä‰€ä‰‰€‰Š€Š0Š€0ŠLŠ€LŠhŠ€hŠ„Œ€„Œ Ž€ ŽÀŽ€ÀŽÜŽ€ÜŽø£€ø££€£(£€(£D£€D£`£€`£|£€|£”£€”£°£€°£Ì£€Ì£è¦€è¦¦€¦ ¦€ ¦<ª€<ªTª€Tªpª€pªŒª€Œª¨­€¨­È­€È­ä­€ä­²€²¼€¼4¼€4¼H¼€H¼lÀlÈÀˆÃ¤Ã€¤ÃÈÌ€ÈÌ;9UNU S�g‰�:‹�4•�4•�4•�›=;=;=;=;=;ˆ^€ˆ1‚ˆ†WCWQWQWQN0NDNJN LN L�Wy�){�#…�#…�#…‰Su‰'w‰!�‰!�‰!�ÏFhÏFlÏFlÏnÏ¡ÃÏ¡ÇÏ¡ÇÏvÉÏÍ A?A?A?ECEC&$&$&$,*,*,*4$0424242*(µ*_µ$nµ$nµ$n% #31B-B-B@/&/-/-G#<G!CG!CGEGEE)AE)AECEC# !0. M5IM5IM$IM$IMKMKQ-EQ'EQ'EQGQGQOQOQOQOQO8)8)8+86! 1)1)1)1/1/„+„1=„?„F„[t„Pv„Pv„J‚„J‚„J‚„‚„‚‡n‡…TNT RT<TRO%KO%KOMF1BF BF BFDFD$" $"šZš$Lš$Rš"Zš"ZšZšZš`ˆš`Žš^–š^– ^&X ^\ g#U g_ g_ g_ I#E I*C I*C I#E IG IG   1/ : :#8 :8 9 9"7 97 97 ­.` ­(o ­(o ­(o ­s¥ ­« -+ /- K!G K-< K'> K'> K'E K'E K!G K!G KI KI (& (& (& ( & 1/ M'= M'I MKV"V:PV:PV/RV/RVTVTVTVT_.L_.[_#]g#eg#eg#eg#eK$5K$IKI*(]#9]![]![k!?kCMk!iöx Hp˜Äà@XpŒ°Ðð (Hl�´Øü<`„¤À  @@float4x4  ¨òñ  ¨òñ   Ê18\ ÿÿÿÿtt|@float4óòñ@ float3óòñ‚ positionñ color  uv0òñ 0uv1òñ @locChamòñ PnormalFrñ `sandVarsñ"lOpaque_fs_v2f color"Opaque_fs_f2f @float2óòñ @ òñ      ¨òñ   Ê18 ÿÿÿÿ #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 8 #line 16 #line 20 #line 135 #line 140 #line 147 BlendState NoBlend_BlendState { BlendEnable [ 0 ] = FALSE ; } ; BlendState Alpha_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = Src_Alpha ; DestBlendAlpha [ 0 ] = Inv_Src_Alpha ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; BlendState Additive_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = ONE ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = Src_Alpha ; DestBlendAlpha [ 0 ] = ONE ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; #line 180 BlendState ParticleBlended_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = ONE ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = ONE ; DestBlendAlpha [ 0 ] = Inv_Src_Alpha ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; DepthStencilState NoDepthTest_NoDepthWrite_DepthState { DepthEnable = FALSE ; DepthWriteMask = Zero ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState NoDepthTest_DepthWrite_DepthState { DepthEnable = FALSE ; DepthWriteMask = All ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState DepthTest_NoDepthWrite_DepthState { DepthEnable = TRUE ; DepthWriteMask = Zero ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState DepthTest_DepthWrite_DepthState { DepthEnable = TRUE ; DepthWriteMask = All ; DepthFunc = Less ; StencilEnable = FALSE ; } ; RasterizerState NoCull_RasterizerState { CullMode = None ; } ; RasterizerState BackFaceCull_RasterizerState { CullMode = Back ; FrontCounterClockwise = TRUE ; } ; RasterizerState FrontFaceCull_RasterizerState { CullMode = Front ; FrontCounterClockwise = TRUE ; } ; #line 243 #line 246 #line 264 #line 269 sampler PointClampSampler : register ( s8 ) { Filter = Min_Mag_Mip_Point ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; } ; sampler LinearClampSampler : register ( s9 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; } ; sampler LinearWrapTSampler : register ( s10 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Clamp ; AddressV = Wrap ; AddressW = Clamp ; } ; sampler LinearWrapSampler : register ( s11 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; } ; sampler PointWrapSampler : register ( s12 ) { Filter = Min_Mag_Mip_Point ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; } ; sampler AnisoClampSampler : register ( s13 ) { Filter = ANISOTROPIC ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; MaxAnisotropy = 16 ; } ; sampler LinearWrapAnisoSampler : register ( s14 ) { Filter = ANISOTROPIC ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; MaxAnisotropy = 16 ; } ; sampler PointWrapAnisoSampler : register ( s15 ) { Filter = Min_Mag_Point_Mip_Linear ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; MaxAnisotropy = 16 ; } ; static const float kSRGB = 2.2f ; #line 358 #line 373 #line 408 #line 427 #line 435 #line 498 #line 516 #line 521 float cameraNearTimesFar ; float cameraFarMinusNear ; float4 cameraNearFar ; #line 527 float ConvertDepth ( float depth ) { #line 532 float viewSpaceZ = - ( cameraNearTimesFar / ( depth * cameraFarMinusNear - cameraNearFar . y ) ) ; return viewSpaceZ ; } #line 587 #line 592 static const float4x4 SCALE_BIAS = float4x4 ( float4 ( 0.5 , 0.0 , 0.0 , 0.5 ) , float4 ( 0.0 , - 0.5 , 0.0 , 0.5 ) , #line 598 float4 ( 0.0 , 0.0 , 0.5 , 0.5 ) , float4 ( 0.0 , 0.0 , 0.0 , 1.0 ) ) ; #line 613 #line 635 #line 642 #line 60 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" float4 eyePositionWS : eyePositionWS ; #line 65 float4x4 model : model ; float4x4 modelIT : modelit ; float4x4 modelViewProj : modelviewproj ; float4x4 modelI : modeli ; #line 81 float4 l_d ; float4 wind ; #line 88 #line 92 float4 uvOffset ; #line 101 #line 130 struct Opaque_vs_a2v { #line 136 float3 Position : POSITION ; float3 normal : NORMAL ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; } ; #line 164 #line 168 struct Opaque_vs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; float4 locCham : TEXCOORD2 ; float4 normalFr : TEXCOORD3 ; float3 sandVars : TEXCOORD4 ; #line 181 } ; #line 187 void Opaque_vs_main ( #line 190 in Opaque_vs_a2v Opaque_vs_IN , out Opaque_vs_v2f Opaque_vs_OUT ) { #line 200 float3 worldPos = mul ( float4 ( Opaque_vs_IN . Position . xyz , 1.0f ) , model ) . xyz ; Opaque_vs_OUT . position = mul ( float4 ( Opaque_vs_IN . Position . xyz , 1.0f ) , modelViewProj ) ; float3 worldNorm = normalize ( mul ( Opaque_vs_IN . normal , ( float3x3 ) modelIT ) ) ; Opaque_vs_OUT . color . rgb = Opaque_vs_IN . color . rgb ; Opaque_vs_OUT . color . a = Opaque_vs_IN . color . a ; Opaque_vs_OUT . uv0 = Opaque_vs_IN . uv0 ; Opaque_vs_OUT . uv1 = Opaque_vs_IN . uv1 ; Opaque_vs_OUT . uv0 += uvOffset . xyxy ; Opaque_vs_OUT . uv1 += uvOffset . xyxy ; Opaque_vs_OUT . locCham . xyz = worldPos ; #line 231 Opaque_vs_OUT . normalFr . xyz = worldNorm ; Opaque_vs_OUT . normalFr . w = 0 ; #line 245 float windForce = min ( ( length ( wind . xyz ) - 10 ) / 70 , 1.0 ) ; #line 252 float windRatio = saturate ( worldNorm . y ) * .65 ; float bleed = lerp ( 0.5 , 0.05 , windForce ) ; float depth = length ( eyePositionWS . xyz - worldPos ) ; float noiseFade = saturate ( 1.5 - depth * 0.02 ) ; Opaque_vs_OUT . sandVars = float3 ( windRatio , bleed , noiseFade ) ; #line 283 } #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 642 #line 301 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #line 308 #line 312 #line 317 Texture3D < float4 > noise3dSmallTex ; #line 325 #line 328 float4 l_c , l_s ; #line 331 float opacity ; float velvetInt , velvetRatio ; #line 336 float lod ; #line 339 float4x4 colorCorrect ; #line 342 Texture2D < float4 > texColor ; Texture2D < float4 > texDetail ; Texture2D < float4 > texRamp ; #line 347 Texture2D < float4 > texAo ; #line 350 Texture2D < float4 > texEdgeMask ; #line 353 Texture2D < float4 > sandFastTexture ; TextureCube < float4 > sandLoIrrCube ; TextureCube < float4 > sandHiIrrCube ; float4 sandBias ; float4 sandScale ; Texture2D < float4 > heightTexture ; float4 heightBiasUv ; float4 heightScaleUv ; float heightBiasY ; Texture2D < float4 > duneTexture ; Texture2D < float4 > duneColorTexture ; float duneHeightOff ; #line 373 #line 376 float4 aoStepBiasInt ; #line 379 float4 localDudePos ; float4 remoteDudePos ; float4 specular ; float4 uvMlt ; #line 400 #line 403 float inShadow ; #line 411 struct Opaque_fs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; float4 locCham : TEXCOORD2 ; float4 normalFr : TEXCOORD3 ; float3 sandVars : TEXCOORD4 ; #line 424 } ; struct Opaque_fs_f2f { float4 color : SV_TARGET0 ; } ; #line 438 void Opaque_fs_main ( in Opaque_fs_v2f Opaque_fs_IN , out Opaque_fs_f2f Opaque_fs_OUT ) { Opaque_fs_OUT . color = Opaque_fs_IN . color ; #line 446 float3 noiseUv = 0.125 * Opaque_fs_IN . locCham . xyz ; #line 449 float2 noiseTap = noise3dSmallTex . Sample ( LinearWrapSampler , noiseUv ) . xy ; #line 455 float3 colorTap = Opaque_fs_IN . color . rgb * pow ( texColor . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv0 . xy * uvMlt . x ) , kSRGB ) . rgb ; colorTap = mul ( ( float3x3 ) colorCorrect , colorTap ) ; #line 460 float alphaTap = Opaque_fs_IN . color . a * texColor . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv0 . xy * uvMlt . x ) . a ; #line 463 float2 aoUv = Opaque_fs_IN . uv0 . zw ; float aoTap = pow ( texAo . Sample ( LinearWrapSampler , aoUv ) . xy , 2.2f ) . g ; aoTap = saturate ( aoTap + aoStepBiasInt . y + aoStepBiasInt . z + 0.5 ) ; #line 468 float3 detailTap = ( float3 ) pow ( texDetail . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv1 . xy * uvMlt . z ) , kSRGB ) . rgb ; #line 471 float3 rampTap = ( float3 ) pow ( texRamp . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv1 . zw * uvMlt . z ) , kSRGB ) . rgb ; #line 474 float edgeDetail = 0.25 ; float edgeDetailTap = texEdgeMask . Sample ( LinearWrapSampler , Opaque_fs_IN . uv0 . zw * uvMlt . y * 7 ) . x * texEdgeMask . Sample ( LinearWrapSampler , Opaque_fs_IN . uv0 . zw * uvMlt . y * 3 ) . x ; #line 480 edgeDetail = edgeDetailTap ; #line 507 #line 510 float3 normal = normalize ( Opaque_fs_IN . normalFr . xyz ) ; #line 520 float3 eye = eyePositionWS . xyz - Opaque_fs_IN . locCham . xyz ; float3 _view = normalize ( eye ) ; float3 light = normalize ( l_d . xyz ) ; float3 halfAngle = normalize ( _view + light ) ; float3 albedo = colorTap * detailTap ; #line 529 float3 ambientColor = float4 ( pow ( sandLoIrrCube . Sample ( LinearClampSampler , normal ) . xyz , 2.2f ) , sandLoIrrCube . Sample ( LinearClampSampler , normal ) . a ) . rgb ; float3 diffuseColor = l_c . rgb ; float3 specularColor = l_s . rgb ; #line 536 float lightIntensity = dot ( normal , light ) ; lightIntensity = min ( rampTap . r - 0.25 , lightIntensity ) ; float lightMask = 1.5 * edgeDetail - 0.25 ; lightIntensity = saturate ( ( lightIntensity + lightMask ) * 20 ) ; float diffuseIntensity = saturate ( lightIntensity - inShadow ) ; float specularIntensity = 0 ; float specMult = specular . x ; float specGlossMult = specular . y + 0.001 ; float F0 = specular . z ; specularIntensity = saturate ( lightIntensity - saturate ( inShadow ) ) ; #line 559 float fresnelT = pow ( saturate ( 1.0 - dot ( _view , halfAngle ) ) , 5.0 ) ; float fresnel = F0 * ( 1.0 - fresnelT ) + fresnelT ; float gloss = specGlossMult ; float specPow = pow ( 256.0 , gloss ) - 1.0 ; specularIntensity *= fresnel * specMult * ( specPow + 8.0 ) / 25.0 * pow ( saturate ( dot ( normal , halfAngle ) ) , specPow ) ; #line 569 float sandIntensity = 0.0 ; #line 574 #line 577 #line 580 float sideIntensity = 0 ; float2 heightUV = ( float2 ( Opaque_fs_IN . locCham . x , Opaque_fs_IN . locCham . z ) + heightBiasUv . xy ) * heightScaleUv . xy ; float heightTap = heightTexture . Sample ( LinearClampSampler , heightUV ) . x ; float duneHeight = heightBiasY + ( float ) duneHeightOff + ( float ) heightTap ; float blendThreshold = 2.22 * ( duneHeight - Opaque_fs_IN . locCham . y ) ; sideIntensity = saturate ( blendThreshold - edgeDetail * 2.666 ) ; sideIntensity *= sideIntensity ; float3 Vn = _view ; float3 Nn = normalize ( Opaque_fs_IN . normalFr . xyz ) ; #line 596 float sandNoise = 0 ; #line 602 #line 605 const float terrainScale = 0.5 ; float2 duneUv = float2 ( 1 - ( terrainScale * Opaque_fs_IN . locCham . x + 0.5 ) / 256 , ( terrainScale * Opaque_fs_IN . locCham . z + 0.5 ) / 512 ) ; float3 duneTap = ( float3 ) pow ( duneTexture . Sample ( AnisoClampSampler , duneUv ) , kSRGB ) . rgb ; #line 611 float2 litUV = ( float2 ( Opaque_fs_IN . locCham . x , Opaque_fs_IN . locCham . z ) + heightBiasUv . xy ) * heightScaleUv . xy ; litUV -= float2 ( 1.0f / 256.0f , 0.0f ) ; float4 litTap = duneColorTexture . Sample ( LinearClampSampler , litUV ) ; float3 litColor = 4.0 * litTap . rgb * litTap . rgb ; float velvDune = litTap . a ; float velvMesh = saturate ( 1.12 - abs ( dot ( Vn , 4.0 * Nn ) ) ) ; velvDune *= 0.333 * sandNoise ; velvMesh *= 0.333 + 0.333 * sandNoise ; #line 621 float3 duneColor = ( 1.0 + velvMesh ) * duneTap ; float3 duneLitColor = ( 1.0 + velvDune ) * litColor ; #line 628 { float3 colorShadowTapAlpha = duneTexture . Sample ( AnisoClampSampler , duneUv ) . a ; float3 _duneColor = pow ( duneTexture . Sample ( AnisoClampSampler , duneUv ) , kSRGB ) . rgb ; float shadow = saturate ( 10 * ( colorShadowTapAlpha - 0.25 ) ) ; float nx = 0 ; float nz = 0 ; #line 639 float3 _Nn = float3 ( 0.0 , 1.0 , 0.0 ) ; float3 Nnt = 25.0 * _Nn + float3 ( nx , 0 , nz ) ; float3 Nnv = 4.0 * _Nn + float3 ( nx , 0 , nz ) ; float4 lightCubeTap = float4 ( pow ( sandHiIrrCube . Sample ( LinearClampSampler , Nnt ) . xyz , 2.2f ) , sandHiIrrCube . Sample ( LinearClampSampler , Nnt ) . a ) ; float diffuseInt = lightCubeTap . a ; float3 fillColor = lightCubeTap . rgb ; float velv = saturate ( 1 - ( abs ( dot ( Vn , Nnv ) ) - 0.12 ) ) ; _duneColor *= 1 + 0.333 * velv ; float diffuseMult = shadow * diffuseInt ; duneLitColor = _duneColor * ( l_c . rgb * diffuseMult + fillColor ) ; } #line 666 #line 672 #line 675 albedo = lerp ( albedo * aoTap , albedo , saturate ( diffuseIntensity - 0.65 ) ) ; #line 678 Opaque_fs_OUT . color . rgb = albedo * ( diffuseIntensity * diffuseColor + ambientColor ) ; Opaque_fs_OUT . color . rgb = lerp ( Opaque_fs_OUT . color . rgb , duneLitColor , sideIntensity ) ; Opaque_fs_OUT . color . rgb += albedo * l_s . rgb * specularIntensity ; #line 689 Opaque_fs_OUT . color . a = alphaTap ; #line 696 #line 700 Opaque_fs_OUT . color . a = ( opacity >= noiseTap . r ) ? Opaque_fs_OUT . color . a : 0 ; #line 705 Opaque_fs_OUT . color . a = Opaque_fs_OUT . color . a > 0.5 ? 1.0 + aoTap : Opaque_fs_OUT . color . a ; #line 712 #line 715 } technique11 Opaque { pass pass0 { SetVertexShader ( CompileShader ( vs_5_0 , Opaque_vs_main ( ) ) ) ; SetPixelShader ( CompileShader ( ps_5_0 , Opaque_fs_main ( ) ) ) ; SetBlendState ( ourBlendState , float4 ( 0.0f , 0.0f , 0.0f , 0.0f ) , 0xFFFFFFFF ) ; SetDepthStencilState ( ourDepthStencilState , 0 ) ; SetRasterizerState ( ourRasterState ) ; } } #line 747 D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Mesh_vs__Mesh_fs__50025.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh (¢AìA)PAPD3DSHDRÌ `ÿÿÿÿ /ñðxamÁÙñµI¥‘ý…áÅ!AYq Ñ�qI=™)± @@€€@@€(@€ $0<T`lx„�œ¨´ÀÌØäðü ,8DP\%Opaque_fs_main&Q ÿÿÿÿÿÿ ÿÿLinearClampSampler&Q ÿÿÿÿÿÿ ÿÿLinearWrapSampler&Q ÿÿÿÿÿÿ ÿÿAnisoClampSampler*Q ÿÿÿÿÿÿÿÿLinearWrapAnisoSamplerR ÿÿÿÿÿÿkSRGB"Q ÿÿÿÿÿÿeyePositionWSQ0ÿÿÿÿÿÿl_d"Qÿÿÿÿÿÿÿÿnoise3dSmallTexQ`ÿÿÿÿÿÿl_cQpÿÿÿÿÿÿl_sQ€ÿÿÿÿÿÿopacity"Q�ÿÿÿÿÿÿcolorCorrectQÿÿÿÿÿÿÿÿtexColorQÿÿÿÿÿÿÿÿtexDetailQÿÿÿÿTSerÿÿÿÿ /ñÿÿÿÿtexRampQÿÿÿÿÿÿÿÿtexAoQÿÿÿÿÿÿÿÿtexEdgeMask"QÿÿÿÿÿÿÿÿsandLoIrrCube"QÿÿÿÿÿÿÿÿsandHiIrrCube"QÿÿÿÿÿÿÿÿheightTexture"QðÿÿÿÿÿÿheightBiasUv"QÿÿÿÿÿÿheightScaleUvQÿÿÿÿÿÿheightBiasYQÿÿÿÿ ÿÿÿÿduneTexture"QÿÿÿÿÿÿduneHeightOff"Q ÿÿÿÿÿÿaoStepBiasIntQPÿÿÿÿÿÿspecularQ`ÿÿÿÿÿÿuvMltQpÿÿÿÿÿÿinShadowÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÌ ` @ÐOpaque_fs_mainnoneÿÿÿÿw 1 Ž?\T ,Ì ` @ÐOpaque_fs_mainnone-º.ñÌ `ÿÿÿÿÌÿÿÿÿÿÿÿÿ'yÃD:\Dev\TGC\Journey\head\Journey\shaderD:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Mesh_vs__Mesh_fs__50025.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.shþïþï”.1TŒ^Ù¥dSç©H–7dzdÏÂ=T/LinkInfo/names/src/headerblock/src/files/d:\dev\tgc\journey\head\journey\shader" ÜQ3 °”'8fB€AŒ.|(x,ànDCmlE)FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde*  !"#$%&'(+,-./0123456789:;<=>?@ABfghjiko€ 8Ph  àôð p@``@p00@ðPà`Ðp8€4„0ˆ,Œ �@1Àаà ð�($€ PPà0@1 °@1`ð@1 p@1  àôð p@``@p00@ðPà`Ðp8€4„0ˆ,Œ �@1Àаà ð�($€ PPà0@1 °@1`ð@1 p@1xÿÿÿÿ4`ÿÿÿÿ4�ÿÿÿÿ4Pÿÿÿÿ4Øÿÿÿÿ4ðÿÿÿÿ4ÿÿÿÿ4 ÿÿÿÿ48ÿÿÿÿ4hÿÿÿÿ4¨ÿÿÿÿ4Àÿÿÿÿ4˜ÿÿÿÿ4Èÿÿÿÿ4àÿÿÿÿ4øÿÿÿÿ4ÿÿÿÿ4(ÿÿÿÿ4°ÿÿÿÿ4€ÿÿÿÿ4x 4`ÿÿÿÿ4�4P4Øÿÿÿÿ4ð44 484h4¨4À4˜4Èÿÿÿÿ4à 4øÿÿÿÿ4 4(ÿÿÿÿ4° 4€ÿÿÿÿ4@0@@@ðP@à`@Ðp@8€@4„@0ˆ@,Œ@1 @�@ÀÐ@°à@ ð@�@(@$@€ @p0@`@APP@@`@ pG4(ÿÿÿÿG4ÿÿÿÿG4øÿÿÿÿG4àÿÿÿÿG4ÈÿÿÿÿG4°ÿÿÿÿG4˜ÿÿÿÿG4€ÿÿÿÿC4hÿÿÿÿB4PÿÿÿÿB48ÿÿÿÿB4 ÿÿÿÿB4ÿÿÿÿB4ðÿÿÿÿB4ØÿÿÿÿD4ÀÿÿÿÿD4¨ÿÿÿÿB4�ÿÿÿÿB4xÿÿÿÿB4`ÿÿÿÿ‚1à@0„1 @°…1`@ðˆ1 @pAnisoClampSamplerLinearClampSamplerLinearWrapAnisoSamplerLinearWrapSamplerLinearWrapTSamplerPointClampSamplerPointWrapAnisoSamplerPointWrapSampleraoStepBiasIntcolorCorrectduneColorTextureduneHeightOffduneTextureheightBiasUvheightBiasYheightScaleUvheightTextureinShadowl_cl_dl_slocalDudePoslodmodelmodelImodelITmodelViewProjnoise3dSmallTexopacityremoteDudePossandBiassandFastTexturesandHiIrrCubesandLoIrrCubesandScalespeculartexAotexColortexDetailtexEdgeMasktexRampuvMltuvOffsetvelvetIntvelvetRatiowindÝÁÿÿ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥05sv05spOpaque_fs_mainOpaque_vs_main€jÊ ú8ÙP}Rh}RCOLORNORMALPOSITIONTEXCOORDpÕ€05svDXBCmÓ!Ù÷jL$ƒôý�‚Û£ÅpÕ8XÔÌhRDEFh<þÿAïRD11< ($ \$Globals«««\€€0LÿÿÿÿÿÿÿÿpLÿÿÿÿÿÿÿÿƒ˜ÿÿÿÿÿÿÿÿ¼ ˜ÿÿÿÿÿÿÿÿÊ0@Üÿÿÿÿÿÿÿÿp@Üÿÿÿÿÿÿÿÿ°@Üÿÿÿÿÿÿÿÿð@Üÿÿÿÿÿÿÿÿ0˜ÿÿÿÿÿÿÿÿ!@˜ÿÿÿÿÿÿÿÿ&P˜ÿÿÿÿÿÿÿÿ/`˜ÿÿÿÿÿÿÿÿ3p˜ÿÿÿÿÿÿÿÿ7€Lÿÿÿÿÿÿÿÿ?„LÿÿÿÿÿÿÿÿIˆLÿÿÿÿÿÿÿÿUŒLÿÿÿÿÿÿÿÿY�@ÜÿÿÿÿÿÿÿÿfИÿÿÿÿÿÿÿÿoà˜ÿÿÿÿÿÿÿÿyð˜ÿÿÿÿÿÿÿÿ†˜ÿÿÿÿÿÿÿÿ”Lÿÿÿÿÿÿÿÿ Lÿÿÿÿÿÿÿÿ® ˜ÿÿÿÿÿÿÿÿ¼0˜ÿÿÿÿÿÿÿÿÉ@˜ÿÿÿÿÿÿÿÿ×P˜ÿÿÿÿÿÿÿÿà`˜ÿÿÿÿÿÿÿÿæpLÿÿÿÿÿÿÿÿcameraNearTimesFarfloat«««CcameraFarMinusNearcameraNearFarfloat4‘eyePositionWSmodelfloat4x4«««ÐmodelITmodelViewProjmodelIl_dwinduvOffsetl_cl_sopacityvelvetIntvelvetRatiolodcolorCorrectsandBiassandScaleheightBiasUvheightScaleUvheightBiasYduneHeightOffaoStepBiasIntlocalDudePosremoteDudePosspecularuvMltinShadowMicrosoft (R) HLSL Shader Compiler 10.1«ISGN €‰�––POSITIONNORMALCOLORTEXCOORD«OSGN̰¼ÂÂÂÂÂSV_POSITIONCOLORTEXCOORD«SHEXðP|jˆYFŽ _r_r_ò_ò_ògò eò eò eò er eò er h6rF6‚@€?FFŽ "FFŽ BFFŽ  FFŽ " FFŽ B FFŽ ‚ FFŽ FF‚ "FF‚ BFF‚ ‚FFD‚:8röF6r F6‚ :6òF6òFò FF„ ò FF„ 6r F6r F+‚ @ F‚ F‚ K +B@ 6B*€A* +B@F *3 @€?4"@3"@€?8"@ff&?6B@¿B*@ÍÌL=8*  @?6rF€ArFF‚ BFFKB*8B*@ ×£<6B*€AB*@À?4B*@3B*@€?6 6"  6B *>STAT”4 % SPDBÆMicrosoft C/C++ MSF 7.00 DSc¨_Àÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ8ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ <ÿÿÿÿ”.1TŒ^øÔ¿7n3I£…ÿ vq·¿ÜQ3a [ 0 ] = ONE ; DestBlendAlpha [ 0 ] = ONE ; BlendOpAlpha [ 0 ] = ADD ; RenderTargetWriteMask [ 0 ] = 15 ; AlphaToCoverageEnable = false ; } ; DepthStencilState ourDepthStencilState { DepthEnable = true ; DepthFunc = less ; StencilEnable = false ; } ; RasterizerState ourRasterState { CullMode = None ; DepthBias = 0.0f ; ScissorEnable = false ; MultiSampleEnable = false ; DepthClipEnable = false ; AntialiasedLineEnable = false ; } ; LèÆZ¿; þ'§ÿ�dP…h&éð}µgŸÁ!A¹#line 1 "D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Mesh_vs__Mesh_fs__50025.fx" #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #line 11 BlendState ourBlendState { BlendEnable [ 0 ] = FALSE ; BlendEnable [ 1 ] = FALSE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = ONE ; DestBlendAlpha [ 0 ] = ONE ; BlendOpAlpha [ 0 ] = ADD ; RenderTargetWriteMask [ 0 ] = 15 ; AlphaToCoverageEnable = false ; } ; DepthStencilState ourDepthStencilState { DepthEnable = true ; DepthFunc = less ; StencilEnable = false ; } ; RasterizerState ourRasterState { CullMode = None ; DepthBias = 0.0f ; ScissorEnable = false ; MultiSampleEnable = false ; DepthClipEnable = false ; AntialiasedLineEnable = false ; } ; #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 8 #line 16 #line 20 #line 135 #line 140 #line 147 BlendState NoBlend_BlendState { BlendEnable [ 0 ] = FALSE ; } ; BlendState Alpha_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = Src_Alpha ; DestBlendAlpha [ 0 ] = Inv_Src_Alpha ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; BlendState Additive_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = ONE ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = Src_Alpha ; DestBlendAlpha [ 0 ] = ONE ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; #line 180 BlendState ParticleBlended_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = ONE ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = ONE ; DestBlendAlpha [ 0 ] = Inv_Src_Alpha ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; DepthStencilState NoDepthTest_NoDepthWrite_DepthState { DepthEnable = FALSE ; DepthWriteMask = Zero ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState NoDepthTest_DepthWrite_DepthState { DepthEnable = FALSE ; DepthWriteMask = All ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState DepthTest_NoDepthWrite_DepthState { DepthEnable = TRUE ; DepthWriteMask = Zero ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState DepthTest_DepthWrite_DepthState { DepthEnable = TRUE ; DepthWriteMask = All ; DepthFunc = Less ; StencilEnable = FALSE ; } ; RasterizerState NoCull_RasterizerState { CullMode = None ; } ; RasterizerState BackFaceCull_RasterizerState { CullMode = Back ; FrontCounterClockwise = TRUE ; } ; RasterizerState FrontFaceCull_RasterizerState { CullMode = Front ; FrontCounterClockwise = TRUE ; } ; #line 243 #line 246 #line 264 #line 269 sampler PointClampSampler : register ( s8 ) { Filter = Min_Mag_Mip_Point ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; } ; sampler LinearClampSampler : register ( s9 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; } ; sampler LinearWrapTSampler : register ( s10 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Clamp ; AddressV = Wrap ; AddressW = Clamp ; } ; sampler LinearWrapSampler : register ( s11 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; } ; sampler PointWrapSampler : register ( s12 ) { Filter = Min_Mag_Mip_Point ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; } ; sampler AnisoClampSampler : register ( s13 ) { Filter = ANISOTROPIC ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; MaxAnisotropy = 16 ; } ; sampler LinearWrapAnisoSampler : register ( s14 ) { Filter = ANISOTROPIC ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; MaxAnisotropy = 16 ; } ; sampler PointWrapAnisoSampler : register ( s15 ) { Filter = Min_Mag_Point_Mip_Linear ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; MaxAnisotropy = 16 ; } ; static const float kSRGB = 2.2f ; #line 358 #line 373 #line 408 #line 427 #line 435 #line 498 #line 516 #line 521 float cameraNearTimesFar ; float cameraFarMinusNear ; float4 cameraNearFar ; #line 527 float ConvertDepth ( float depth ) { #line 532 float viewSpaceZ = - ( cameraNearTimesFar / ( depth * cameraFarMinusNear - cameraNearFar . y ) ) ; return viewSpaceZ ; } #line 587 #line 592 static const float4x4 SCALE_BIAS = float4x4 ( float4 ( 0.5 , 0.0 , 0.0 , 0.5 ) , float4 ( 0.0 , - 0.5 , 0.0 , 0.5 ) , #line 598 float4 ( 0.0 , 0.0 , 0.5 , 0.5 ) , float4 ( 0.0 , 0.0 , 0.0 , 1.0 ) ) ; #line 613 #line 635 #line 642 #line 60 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" float4 eyePositionWS : eyePositionWS ; #line 65 float4x4 model : model ; float4x4 modelIT : modelit ; float4x4 modelViewProj : modelviewproj ; float4x4 modelI : modeli ; #line 81 float4 l_d ; float4 wind ; #line 88 #line 92 float4 uvOffset ; #line 101 #line 130 struct Opaque_vs_a2v { #line 136 float3 Position : POSITION ; float3 normal : NORMAL ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; } ; #line 164 #line 168 struct Opaque_vs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; float4 locCham : TEXCOORD2 ; float4 normalFr : TEXCOORD3 ; float3 sandVars : TEXCOORD4 ; #line 181 } ; #line 187 void Opaque_vs_main ( #line 190 in Opaque_vs_a2v Opaque_vs_IN , out Opaque_vs_v2f Opaque_vs_OUT ) { #line 200 float3 worldPos = mul ( float4 ( Opaque_vs_IN . Position . xyz , 1.0f ) , model ) . xyz ; Opaque_vs_OUT . position = mul ( float4 ( Opaque_vs_IN . Position . xyz , 1.0f ) , modelViewProj ) ; float3 worldNorm = normalize ( mul ( Opaque_vs_IN . normal , ( float3x3 ) modelIT ) ) ; Opaque_vs_OUT . color . rgb = Opaque_vs_IN . color . rgb ; Opaque_vs_OUT . color . a = Opaque_vs_IN . color . a ; Opaque_vs_OUT . uv0 = Opaque_vs_IN . uv0 ; Opaque_vs_OUT . uv1 = Opaque_vs_IN . uv1 ; Opaque_vs_OUT . uv0 += uvOffset . xyxy ; Opaque_vs_OUT . uv1 += uvOffset . xyxy ; Opaque_vs_OUT . locCham . xyz = worldPos ; #line 231 Opaque_vs_OUT . normalFr . xyz = worldNorm ; Opaque_vs_OUT . normalFr . w = 0 ; #line 245 float windForce = min ( ( length ( wind . xyz ) - 10 ) / 70 , 1.0 ) ; #line 252 float windRatio = saturate ( worldNorm . y ) * .65 ; float bleed = lerp ( 0.5 , 0.05 , windForce ) ; float depth = length ( eyePositionWS . xyz - worldPos ) ; float noiseFade = saturate ( 1.5 - depth * 0.02 ) ; Opaque_vs_OUT . sandVars = float3 ( windRatio , bleed , noiseFade ) ; #line 283 } #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 642 #line 301 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #line 308 #line 312 #line 317 Texture3D < float4 > noise3dSmallTex ; #line 325 #line 328 float4 l_c , l_s ; #line 331 float opacity ; float velvetInt , velvetRatio ; #line 336 float lod ; #line 339 float4x4 colorCorrect ; #line 342 Texture2D < float4 > texColor ; Texture2D < float4 > texDetail ; Texture2D < float4 > texRamp ; #line 347 Texture2D < float4 > texAo ; #line 350 Texture2D < float4 > texEdgeMask ; #line 353 Texture2D < float4 > sandFastTexture ; TextureCube < float4 > sandLoIrrCube ; TextureCube < float4 > sandHiIrrCube ; float4 sandBias ; float4 sandScale ; Texture2D < float4 > heightTexture ; float4 heightBiasUv ; float4 heightScaleUv ; float heightBiasY ; Texture2D < float4 > duneTexture ; Texture2D < float4 > duneColorTexture ; float duneHeightOff ; #line 373 #line 376 float4 aoStepBiasInt ; #line 379 float4 localDudePos ; float4 remoteDudePos ; float4 specular ; float4 uvMlt ; #line 400 #line 403 float inShadow ; #line 411 struct Opaque_fs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; float4 locCham : TEXCOORD2 ; float4 normalFr : TEXCOORD3 ; float3 sandVars : TEXCOORD4 ; #line 424 } ; struct Opaque_fs_f2f { float4 color : SV_TARGET0 ; } ; #line 438 void Opaque_fs_main ( in Opaque_fs_v2f Opaque_fs_IN , out Opaque_fs_f2f Opaque_fs_OUT ) { Opaque_fs_OUT . color = Opaque_fs_IN . color ; #line 446 float3 noiseUv = 0.125 * Opaque_fs_IN . locCham . xyz ; #line 449 float2 noiseTap = noise3dSmallTex . Sample ( LinearWrapSampler , noiseUv ) . xy ; #line 455 float3 colorTap = Opaque_fs_IN . color . rgb * pow ( texColor . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv0 . xy * uvMlt . x ) , kSRGB ) . rgb ; colorTap = mul ( ( float3x3 ) colorCorrect , colorTap ) ; #line 460 float alphaTap = Opaque_fs_IN . color . a * texColor . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv0 . xy * uvMlt . x ) . a ; #line 463 float2 aoUv = Opaque_fs_IN . uv0 . zw ; float aoTap = pow ( texAo . Sample ( LinearWrapSampler , aoUv ) . xy , 2.2f ) . g ; aoTap = saturate ( aoTap + aoStepBiasInt . y + aoStepBiasInt . z + 0.5 ) ; #line 468 float3 detailTap = ( float3 ) pow ( texDetail . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv1 . xy * uvMlt . z ) , kSRGB ) . rgb ; #line 471 float3 rampTap = ( float3 ) pow ( texRamp . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv1 . zw * uvMlt . z ) , kSRGB ) . rgb ; #line 474 float edgeDetail = 0.25 ; float edgeDetailTap = texEdgeMask . Sample ( LinearWrapSampler , Opaque_fs_IN . uv0 . zw * uvMlt . y * 7 ) . x * texEdgeMask . Sample ( LinearWrapSampler , Opaque_fs_IN . uv0 . zw * uvMlt . y * 3 ) . x ; #line 480 edgeDetail = edgeDetailTap ; #line 507 #line 510 float3 normal = normalize ( Opaque_fs_IN . normalFr . xyz ) ; #line 520 float3 eye = eyePositionWS . xyz - Opaque_fs_IN . locCham . xyz ; float3 _view = normalize ( eye ) ; float3 light = normalize ( l_d . xyz ) ; float3 halfAngle = normalize ( _view + light ) ; float3 albedo = colorTap * detailTap ; #line 529 float3 ambientColor = float4 ( pow ( sandLoIrrCube . Sample ( LinearClampSampler , normal ) . xyz , 2.2f ) , sandLoIrrCube . Sample ( LinearClampSampler , normal ) . a ) . rgb ; float3 diffuseColor = l_c . rgb ; float3 specularColor = l_s . rgb ; #line 536 float lightIntensity = dot ( normal , light ) ; lightIntensity = min ( rampTap . r - 0.25 , lightIntensity ) ; float lightMask = 1.5 * edgeDetail - 0.25 ; lightIntensity = saturate ( ( lightIntensity + lightMask ) * 20 ) ; float diffuseIntensity = saturate ( lightIntensity - inShadow ) ; float specularIntensity = 0 ; float specMult = specular . x ; float specGlossMult = specular . y + 0.001 ; float F0 = specular . z ; specularIntensity = saturate ( lightIntensity - saturate ( inShadow ) ) ; #line 559 float fresnelT = pow ( saturate ( 1.0 - dot ( _view , halfAngle ) ) , 5.0 ) ; float fresnel = F0 * ( 1.0 - fresnelT ) + fresnelT ; float gloss = specGlossMult ; float specPow = pow ( 256.0 , gloss ) - 1.0 ; specularIntensity *= fresnel * specMult * ( specPow + 8.0 ) / 25.0 * pow ( saturate ( dot ( normal , halfAngle ) ) , specPow ) ; #line 569 float sandIntensity = 0.0 ; #line 574 #line 577 #line 580 float sideIntensity = 0 ; float2 heightUV = ( float2 ( Opaque_fs_IN . locCham . x , Opaque_fs_IN . locCham . z ) + heightBiasUv . xy ) * heightScaleUv . xy ; float heightTap = heightTexture . Sample ( LinearClampSampler , heightUV ) . x ; float duneHeight = heightBiasY + ( float ) duneHeightOff + ( float ) heightTap ; float blendThreshold = 2.22 * ( duneHeight - Opaque_fs_IN . locCham . y ) ; sideIntensity = saturate ( blendThreshold - edgeDetail * 2.666 ) ; sideIntensity *= sideIntensity ; float3 Vn = _view ; float3 Nn = normalize ( Opaque_fs_IN . normalFr . xyz ) ; #line 596 float sandNoise = 0 ; #line 602 #line 605 const float terrainScale = 0.5 ; float2 duneUv = float2 ( 1 - ( terrainScale * Opaque_fs_IN . locCham . x + 0.5 ) / 256 , ( terrainScale * Opaque_fs_IN . locCham . z + 0.5 ) / 512 ) ; float3 duneTap = ( float3 ) pow ( duneTexture . Sample ( AnisoClampSampler , duneUv ) , kSRGB ) . rgb ; #line 611 float2 litUV = ( float2 ( Opaque_fs_IN . locCham . x , Opaque_fs_IN . locCham . z ) + heightBiasUv . xy ) * heightScaleUv . xy ; litUV -= float2 ( 1.0f / 256.0f , 0.0f ) ; float4 litTap = duneColorTexture . Sample ( LinearClampSampler , litUV ) ; float3 litColor = 4.0 * litTap . rgb * litTap . rgb ; float velvDune = litTap . a ; float velvMesh = saturate ( 1.12 - abs ( dot ( Vn , 4.0 * Nn ) ) ) ; velvDune *= 0.333 * sandNoise ; velvMesh *= 0.333 + 0.333 * sandNoise ; #line 621 float3 duneColor = ( 1.0 + velvMesh ) * duneTap ; float3 duneLitColor = ( 1.0 + velvDune ) * litColor ; #line 628 { float3 colorShadowTapAlpha = duneTexture . Sample ( AnisoClampSampler , duneUv ) . a ; float3 _duneColor = pow ( duneTexture . Sample ( AnisoClampSampler , duneUv ) , kSRGB ) . rgb ; float shadow = saturate ( 10 * ( colorShadowTapAlpha - 0.25 ) ) ; float nx = 0 ; float nz = 0 ; #line 639 float3 _Nn = float3 ( 0.0 , 1.0 , 0.0 ) ; float3 Nnt = 25.0 * _Nn + float3 ( nx , 0 , nz ) ; float3 Nnv = 4.0 * _Nn + float3 ( nx , 0 , nz ) ; float4 lightCubeTap = float4 ( pow ( sandHiIrrCube . Sample ( LinearClampSampler , Nnt ) . xyz , 2.2f ) , sandHiIrrCube . Sample ( LinearClampSampler , Nnt ) . a ) ; float diffuseInt = lightCubeTap . a ; float3 fillColor = lightCubeTap . rgb ; float velv = saturate ( 1 - ( abs ( dot ( Vn , Nnv ) ) - 0.12 ) ) ; _duneColor *= 1 + 0.333 * velv ; float diffuseMult = shadow * diffuseInt ; duneLitColor = _duneColor * ( l_c . rgb * diffuseMult + fillColor ) ; } #line 666 #line 672 #line 675 albedo = lerp ( albedo * aoTap , albedo , saturate ( diffuseIntensity - 0.65 ) ) ; #line 678 Opaque_fs_OUT . color . rgb = albedo * ( diffuseIntensity * diffuseColor + ambientColor ) ; Opaque_fs_OUT . color . rgb = lerp ( Opaque_fs_OUT . color . rgb , duneLitColor , sideIntensity ) ; Opaque_fs_OUT . color . rgb += albedo * l_s . rgb * specularIntensity ; #line 689 Opaque_fs_OUT . color . a = alphaTap ; #line 696 #line 700 Opaque_fs_OUT . color . a = ( opacity >= noiseTap . r ) ? Opaque_fs_OUT . color . a : 0 ; #line 705 Opaque_fs_OUT . color . a = Opaque_fs_OUT . color . a > 0.5 ? 1.0 + aoTap : Opaque_fs_OUT . color . a ; #line 712 #line 715 } technique11 Opaque { pass pass0 { SetVertexShader ( CompileShader ( vs_5_0 , Opaque_vs_main ( ) ) ) ; SetPixelShader ( CompileShader ( ps_5_0 , Opaque_fs_main ( ) ) ) ; SetBlendState ( ourBlendState , float4 ( 0.0f , 0.0f , 0.0f , 0.0f ) , 0xFFFFFFFF ) ; SetDepthStencilState ( ourDepthStencilState , 0 ) ; SetRasterizerState ( ourRasterState ) ; } } #line 747 þïþï&BD:\Dev\TGC\Journey\head\Journey\shaderd:\dev\tgc\journey\head\journey\shader#line 1 "D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Mesh_vs__Mesh_fs__50025.fx" #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #line 11 BlendState ourBlendState { BlendEnable [ 0 ] = FALSE ; BlendEnable [ 1 ] = FALSE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlphâ0€˜ï�†¾ÊÕ)(â0ÕOΰA()B< ºG ºGMicrosoft (R) HLSL Shader Compiler 10.1Æ=hlslFlags0x4005hlslTargetvs_5_0hlslEntryOpaque_vs_mainhlslDefines /DSAND_SIDE=1 /DEDGE_DETAIL=1 /DSPECULAR=1 /DUV_OFFSET=1 /DSHADOW_MAP=1 /DDITHER_OUT=1 /DSAND_FANCY=1 /DPHYRE_D3DFX=16 88¸ Opaque_vs_main2> Opaque_vs_INP¸8P¸8P¸8P ¸8P¸8P¸8P¸8 P¸8$P ¸8(P$¸8,P(¸80P,¸84P0¸88P4¸8<P8¸8@P<¸8DP@¸8HPD¸8L6> Opaque_vs_OUTPL¸8LP`¸8`Pd¸8dPh¸8hPP¸8PPT¸8TPX¸8XP\¸8\P@¸8@PD¸8DPH¸8HP0¸80P4¸84P8¸88P<¸8<P ¸8 P$¸8$P(¸8(P,¸8,P¸8P¸8P¸8P¸8P¸8P¸8P¸8P ¸8 P ¨4 P$¨4$P(¨4(P,¨4,P0¼@0P4¼@4P8¼@8P<¼@<.>worldPosPØP ¸P@˜2>worldNormPlðPl´Pl2>@windForceP 2>@windRatioPX˜.>@bleedPÀ0.>@depthP(2>@noiseFadeP°@ô0@bôïn~·0:{’Ð#PA¢AìAòøð hì¸É€¸ÉÌÉ€ÌÉàÉ€àÉÉ€É É€ É@Ê€@Ê`Ê€`ʀʀ€Ê Ê€ ÊÀË€ÀËàË€àËË€Ë Ë€ Ë<Ë€<ËPË€PËl΀l΀Ï€€Ï”Ѐ”ШÑ€¨ѼÓ€¼ÓÜÔ€ÜÔüÖ€üÖè€è$é€$é8ø€8ø\ø€\øpø€pø„ø€„øœø€œø¸ø€¸øÌø€Ìøèø€èøþ€þ þ€ þ<þ€<þXÿ€Xÿlÿ€lÿˆÿ€ˆÿ¤ÿ€¤ÿÀ€ÀØ€Øø€ø€(€(D€D\€\x€x”€”°€°Ä€ÄØ€Øì€ì]U]U]U]U]Uh fh fh fh f[$W[$W[$W[Y[Y[Y><:8.,.,,*,*.,0.&$I3I3I8I8I8I?I?IG80808631313131=9=9=;=;7(37"37"37575IGIGIGö D`| ¼   Ê18Ô ÿÿÿÿ88@@ float3óòñ@float4óòñZ Positionñ  normalóòñ color (uv0òñ 8uv1òñ"HOpaque_vs_a2v‚ positionñ color  uv0òñ 0uv1òñ @locChamòñ PnormalFrñ `sandVarsñ"lOpaque_vs_v2f    @@float4x4   Ê18 ÿÿÿÿ #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 8 #line 16 #line 20 #line 135 #line 140 #line 147 BlendState NoBlend_BlendState { BlendEnable [ 0 ] = FALSE ; } ; BlendState Alpha_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = Src_Alpha ; DestBlendAlpha [ 0 ] = Inv_Src_Alpha ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; BlendState Additive_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = ONE ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = Src_Alpha ; DestBlendAlpha [ 0 ] = ONE ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; #line 180 BlendState ParticleBlended_BlendState { BlendEnable [ 0 ] = TRUE ; SrcBlend [ 0 ] = ONE ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = ONE ; DestBlendAlpha [ 0 ] = Inv_Src_Alpha ; BlendOpAlpha [ 0 ] = ADD ; BlendEnable [ 1 ] = FALSE ; } ; DepthStencilState NoDepthTest_NoDepthWrite_DepthState { DepthEnable = FALSE ; DepthWriteMask = Zero ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState NoDepthTest_DepthWrite_DepthState { DepthEnable = FALSE ; DepthWriteMask = All ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState DepthTest_NoDepthWrite_DepthState { DepthEnable = TRUE ; DepthWriteMask = Zero ; DepthFunc = Less ; StencilEnable = FALSE ; } ; DepthStencilState DepthTest_DepthWrite_DepthState { DepthEnable = TRUE ; DepthWriteMask = All ; DepthFunc = Less ; StencilEnable = FALSE ; } ; RasterizerState NoCull_RasterizerState { CullMode = None ; } ; RasterizerState BackFaceCull_RasterizerState { CullMode = Back ; FrontCounterClockwise = TRUE ; } ; RasterizerState FrontFaceCull_RasterizerState { CullMode = Front ; FrontCounterClockwise = TRUE ; } ; #line 243 #line 246 #line 264 #line 269 sampler PointClampSampler : register ( s8 ) { Filter = Min_Mag_Mip_Point ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; } ; sampler LinearClampSampler : register ( s9 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; } ; sampler LinearWrapTSampler : register ( s10 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Clamp ; AddressV = Wrap ; AddressW = Clamp ; } ; sampler LinearWrapSampler : register ( s11 ) { Filter = Min_Mag_Mip_Linear ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; } ; sampler PointWrapSampler : register ( s12 ) { Filter = Min_Mag_Mip_Point ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; } ; sampler AnisoClampSampler : register ( s13 ) { Filter = ANISOTROPIC ; AddressU = Clamp ; AddressV = Clamp ; AddressW = Clamp ; MaxAnisotropy = 16 ; } ; sampler LinearWrapAnisoSampler : register ( s14 ) { Filter = ANISOTROPIC ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; MaxAnisotropy = 16 ; } ; sampler PointWrapAnisoSampler : register ( s15 ) { Filter = Min_Mag_Point_Mip_Linear ; AddressU = Wrap ; AddressV = Wrap ; AddressW = Wrap ; MaxAnisotropy = 16 ; } ; static const float kSRGB = 2.2f ; #line 358 #line 373 #line 408 #line 427 #line 435 #line 498 #line 516 #line 521 float cameraNearTimesFar ; float cameraFarMinusNear ; float4 cameraNearFar ; #line 527 float ConvertDepth ( float depth ) { #line 532 float viewSpaceZ = - ( cameraNearTimesFar / ( depth * cameraFarMinusNear - cameraNearFar . y ) ) ; return viewSpaceZ ; } #line 587 #line 592 static const float4x4 SCALE_BIAS = float4x4 ( float4 ( 0.5 , 0.0 , 0.0 , 0.5 ) , float4 ( 0.0 , - 0.5 , 0.0 , 0.5 ) , #line 598 float4 ( 0.0 , 0.0 , 0.5 , 0.5 ) , float4 ( 0.0 , 0.0 , 0.0 , 1.0 ) ) ; #line 613 #line 635 #line 642 #line 60 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" float4 eyePositionWS : eyePositionWS ; #line 65 float4x4 model : model ; float4x4 modelIT : modelit ; float4x4 modelViewProj : modelviewproj ; float4x4 modelI : modeli ; #line 81 float4 l_d ; float4 wind ; #line 88 #line 92 float4 uvOffset ; #line 101 #line 130 struct Opaque_vs_a2v { #line 136 float3 Position : POSITION ; float3 normal : NORMAL ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; } ; #line 164 #line 168 struct Opaque_vs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; float4 locCham : TEXCOORD2 ; float4 normalFr : TEXCOORD3 ; float3 sandVars : TEXCOORD4 ; #line 181 } ; #line 187 void Opaque_vs_main ( #line 190 in Opaque_vs_a2v Opaque_vs_IN , out Opaque_vs_v2f Opaque_vs_OUT ) { #line 200 float3 worldPos = mul ( float4 ( Opaque_vs_IN . Position . xyz , 1.0f ) , model ) . xyz ; Opaque_vs_OUT . position = mul ( float4 ( Opaque_vs_IN . Position . xyz , 1.0f ) , modelViewProj ) ; float3 worldNorm = normalize ( mul ( Opaque_vs_IN . normal , ( float3x3 ) modelIT ) ) ; Opaque_vs_OUT . color . rgb = Opaque_vs_IN . color . rgb ; Opaque_vs_OUT . color . a = Opaque_vs_IN . color . a ; Opaque_vs_OUT . uv0 = Opaque_vs_IN . uv0 ; Opaque_vs_OUT . uv1 = Opaque_vs_IN . uv1 ; Opaque_vs_OUT . uv0 += uvOffset . xyxy ; Opaque_vs_OUT . uv1 += uvOffset . xyxy ; Opaque_vs_OUT . locCham . xyz = worldPos ; #line 231 Opaque_vs_OUT . normalFr . xyz = worldNorm ; Opaque_vs_OUT . normalFr . w = 0 ; #line 245 float windForce = min ( ( length ( wind . xyz ) - 10 ) / 70 , 1.0 ) ; #line 252 float windRatio = saturate ( worldNorm . y ) * .65 ; float bleed = lerp ( 0.5 , 0.05 , windForce ) ; float depth = length ( eyePositionWS . xyz - worldPos ) ; float noiseFade = saturate ( 1.5 - depth * 0.02 ) ; Opaque_vs_OUT . sandVars = float3 ( windRatio , bleed , noiseFade ) ; #line 283 } #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 642 #line 301 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fx" #line 308 #line 312 #line 317 Texture3D < float4 > noise3dSmallTex ; #line 325 #line 328 float4 l_c , l_s ; #line 331 float opacity ; float velvetInt , velvetRatio ; #line 336 float lod ; #line 339 float4x4 colorCorrect ; #line 342 Texture2D < float4 > texColor ; Texture2D < float4 > texDetail ; Texture2D < float4 > texRamp ; #line 347 Texture2D < float4 > texAo ; #line 350 Texture2D < float4 > texEdgeMask ; #line 353 Texture2D < float4 > sandFastTexture ; TextureCube < float4 > sandLoIrrCube ; TextureCube < float4 > sandHiIrrCube ; float4 sandBias ; float4 sandScale ; Texture2D < float4 > heightTexture ; float4 heightBiasUv ; float4 heightScaleUv ; float heightBiasY ; Texture2D < float4 > duneTexture ; Texture2D < float4 > duneColorTexture ; float duneHeightOff ; #line 373 #line 376 float4 aoStepBiasInt ; #line 379 float4 localDudePos ; float4 remoteDudePos ; float4 specular ; float4 uvMlt ; #line 400 #line 403 float inShadow ; #line 411 struct Opaque_fs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float4 uv0 : TEXCOORD0 ; float4 uv1 : TEXCOORD1 ; float4 locCham : TEXCOORD2 ; float4 normalFr : TEXCOORD3 ; float3 sandVars : TEXCOORD4 ; #line 424 } ; struct Opaque_fs_f2f { float4 color : SV_TARGET0 ; } ; #line 438 void Opaque_fs_main ( in Opaque_fs_v2f Opaque_fs_IN , out Opaque_fs_f2f Opaque_fs_OUT ) { Opaque_fs_OUT . color = Opaque_fs_IN . color ; #line 446 float3 noiseUv = 0.125 * Opaque_fs_IN . locCham . xyz ; #line 449 float2 noiseTap = noise3dSmallTex . Sample ( LinearWrapSampler , noiseUv ) . xy ; #line 455 float3 colorTap = Opaque_fs_IN . color . rgb * pow ( texColor . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv0 . xy * uvMlt . x ) , kSRGB ) . rgb ; colorTap = mul ( ( float3x3 ) colorCorrect , colorTap ) ; #line 460 float alphaTap = Opaque_fs_IN . color . a * texColor . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv0 . xy * uvMlt . x ) . a ; #line 463 float2 aoUv = Opaque_fs_IN . uv0 . zw ; float aoTap = pow ( texAo . Sample ( LinearWrapSampler , aoUv ) . xy , 2.2f ) . g ; aoTap = saturate ( aoTap + aoStepBiasInt . y + aoStepBiasInt . z + 0.5 ) ; #line 468 float3 detailTap = ( float3 ) pow ( texDetail . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv1 . xy * uvMlt . z ) , kSRGB ) . rgb ; #line 471 float3 rampTap = ( float3 ) pow ( texRamp . Sample ( LinearWrapAnisoSampler , Opaque_fs_IN . uv1 . zw * uvMlt . z ) , kSRGB ) . rgb ; #line 474 float edgeDetail = 0.25 ; float edgeDetailTap = texEdgeMask . Sample ( LinearWrapSampler , Opaque_fs_IN . uv0 . zw * uvMlt . y * 7 ) . x * texEdgeMask . Sample ( LinearWrapSampler , Opaque_fs_IN . uv0 . zw * uvMlt . y * 3 ) . x ; #line 480 edgeDetail = edgeDetailTap ; #line 507 #line 510 float3 normal = normalize ( Opaque_fs_IN . normalFr . xyz ) ; #line 520 float3 eye = eyePositionWS . xyz - Opaque_fs_IN . locCham . xyz ; float3 _view = normalize ( eye ) ; float3 light = normalize ( l_d . xyz ) ; float3 halfAngle = normalize ( _view + light ) ; float3 albedo = colorTap * detailTap ; #line 529 float3 ambientColor = float4 ( pow ( sandLoIrrCube . Sample ( LinearClampSampler , normal ) . xyz , 2.2f ) , sandLoIrrCube . Sample ( LinearClampSampler , normal ) . a ) . rgb ; float3 diffuseColor = l_c . rgb ; float3 specularColor = l_s . rgb ; #line 536 float lightIntensity = dot ( normal , light ) ; lightIntensity = min ( rampTap . r - 0.25 , lightIntensity ) ; float lightMask = 1.5 * edgeDetail - 0.25 ; lightIntensity = saturate ( ( lightIntensity + lightMask ) * 20 ) ; float diffuseIntensity = saturate ( lightIntensity - inShadow ) ; float specularIntensity = 0 ; float specMult = specular . x ; float specGlossMult = specular . y + 0.001 ; float F0 = specular . z ; specularIntensity = saturate ( lightIntensity - saturate ( inShadow ) ) ; #line 559 float fresnelT = pow ( saturate ( 1.0 - dot ( _view , halfAngle ) ) , 5.0 ) ; float fresnel = F0 * ( 1.0 - fresnelT ) + fresnelT ; float gloss = specGlossMult ; float specPow = pow ( 256.0 , gloss ) - 1.0 ; specularIntensity *= fresnel * specMult * ( specPow + 8.0 ) / 25.0 * pow ( saturate ( dot ( normal , halfAngle ) ) , specPow ) ; #line 569 float sandIntensity = 0.0 ; #line 574 #line 577 #line 580 float sideIntensity = 0 ; float2 heightUV = ( float2 ( Opaque_fs_IN . locCham . x , Opaque_fs_IN . locCham . z ) + heightBiasUv . xy ) * heightScaleUv . xy ; float heightTap = heightTexture . Sample ( LinearClampSampler , heightUV ) . x ; float duneHeight = heightBiasY + ( float ) duneHeightOff + ( float ) heightTap ; float blendThreshold = 2.22 * ( duneHeight - Opaque_fs_IN . locCham . y ) ; sideIntensity = saturate ( blendThreshold - edgeDetail * 2.666 ) ; sideIntensity *= sideIntensity ; float3 Vn = _view ; float3 Nn = normalize ( Opaque_fs_IN . normalFr . xyz ) ; #line 596 float sandNoise = 0 ; #line 602 #line 605 const float terrainScale = 0.5 ; float2 duneUv = float2 ( 1 - ( terrainScale * Opaque_fs_IN . locCham . x + 0.5 ) / 256 , ( terrainScale * Opaque_fs_IN . locCham . z + 0.5 ) / 512 ) ; float3 duneTap = ( float3 ) pow ( duneTexture . Sample ( AnisoClampSampler , duneUv ) , kSRGB ) . rgb ; #line 611 float2 litUV = ( float2 ( Opaque_fs_IN . locCham . x , Opaque_fs_IN . locCham . z ) + heightBiasUv . xy ) * heightScaleUv . xy ; litUV -= float2 ( 1.0f / 256.0f , 0.0f ) ; float4 litTap = duneColorTexture . Sample ( LinearClampSampler , litUV ) ; float3 litColor = 4.0 * litTap . rgb * litTap . rgb ; float velvDune = litTap . a ; float velvMesh = saturate ( 1.12 - abs ( dot ( Vn , 4.0 * Nn ) ) ) ; velvDune *= 0.333 * sandNoise ; velvMesh *= 0.333 + 0.333 * sandNoise ; #line 621 float3 duneColor = ( 1.0 + velvMesh ) * duneTap ; float3 duneLitColor = ( 1.0 + velvDune ) * litColor ; #line 628 { float3 colorShadowTapAlpha = duneTexture . Sample ( AnisoClampSampler , duneUv ) . a ; float3 _duneColor = pow ( duneTexture . Sample ( AnisoClampSampler , duneUv ) , kSRGB ) . rgb ; float shadow = saturate ( 10 * ( colorShadowTapAlpha - 0.25 ) ) ; float nx = 0 ; float nz = 0 ; #line 639 float3 _Nn = float3 ( 0.0 , 1.0 , 0.0 ) ; float3 Nnt = 25.0 * _Nn + float3 ( nx , 0 , nz ) ; float3 Nnv = 4.0 * _Nn + float3 ( nx , 0 , nz ) ; float4 lightCubeTap = float4 ( pow ( sandHiIrrCube . Sample ( LinearClampSampler , Nnt ) . xyz , 2.2f ) , sandHiIrrCube . Sample ( LinearClampSampler , Nnt ) . a ) ; float diffuseInt = lightCubeTap . a ; float3 fillColor = lightCubeTap . rgb ; float velv = saturate ( 1 - ( abs ( dot ( Vn , Nnv ) ) - 0.12 ) ) ; _duneColor *= 1 + 0.333 * velv ; float diffuseMult = shadow * diffuseInt ; duneLitColor = _duneColor * ( l_c . rgb * diffuseMult + fillColor ) ; } #line 666 #line 672 #line 675 albedo = lerp ( albedo * aoTap , albedo , saturate ( diffuseIntensity - 0.65 ) ) ; #line 678 Opaque_fs_OUT . color . rgb = albedo * ( diffuseIntensity * diffuseColor + ambientColor ) ; Opaque_fs_OUT . color . rgb = lerp ( Opaque_fs_OUT . color . rgb , duneLitColor , sideIntensity ) ; Opaque_fs_OUT . color . rgb += albedo * l_s . rgb * specularIntensity ; #line 689 Opaque_fs_OUT . color . a = alphaTap ; #line 696 #line 700 Opaque_fs_OUT . color . a = ( opacity >= noiseTap . r ) ? Opaque_fs_OUT . color . a : 0 ; #line 705 Opaque_fs_OUT . color . a = Opaque_fs_OUT . color . a > 0.5 ? 1.0 + aoTap : Opaque_fs_OUT . color . a ; #line 712 #line 715 } technique11 Opaque { pass pass0 { SetVertexShader ( CompileShader ( vs_5_0 , Opaque_vs_main ( ) ) ) ; SetPixelShader ( CompileShader ( ps_5_0 , Opaque_fs_main ( ) ) ) ; SetBlendState ( ourBlendState , float4 ( 0.0f , 0.0f , 0.0f , 0.0f ) , 0xFFFFFFFF ) ; SetDepthStencilState ( ourDepthStencilState , 0 ) ; SetRasterizerState ( ourRasterState ) ; } } #line 747 D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Mesh_vs__Mesh_fs__50025.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh (¢AìA)PAPD3DSHDRð `ÿÿÿÿ /ñ8 ¡½E}!a $0<H%Opaque_vs_main"Q  ÿÿÿÿÿÿeyePositionWSQ 0ÿÿÿÿÿÿmodelQ pÿÿÿÿÿÿmodelIT"Q °ÿÿÿÿÿÿmodelViewProjQ @ÿÿÿÿÿÿwindQ PÿÿÿÿÿÿuvOffsetVuaÿÿÿÿ /ñÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿð `  DOpaque_vs_mainnoneÿÿÿÿw 1 Ž?\T ,ð `  DOpaque_vs_mainnone-º.ñð `ÿÿÿÿðÿÿÿÿÿÿÿÿ'yÃD:\Dev\TGC\Journey\head\Journey\shaderD:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Mesh_vs__Mesh_fs__50025.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Mesh_vs__Mesh_fs__50025.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.shþïþï”.1TŒ^øÔ¿7n3I£…ÿ vq·¿T/LinkInfo/names/src/headerblock/src/files/d:\dev\tgc\journey\head\journey\shader" ÜQ3 ° '8fB€A|@(h,Ü]43\[5)6789:;<=>?@ABCDEFGHIJKLMNOPQRSTU*  !"#$%&'(+,-./012VWXZY^COLORNORMALPOSITIONTEXCOORDPEffectVariantPMaterialOpaqueVertexNormalColorST   ' . 4*ðàÐ840, À° �($€p`P@ 5(55ø5à5È5°5˜5€7h6P686 66ð6Ø9À9¨6�6x6`1XhX1P±XZP!PAP‘ *P±* XŽX�XœP1 *X‘XÁXñX¡XÑX�X±XáH¸P! PAP!PaX¦X¨ PQ P± Pñ P± < Pñ P hªP�hºaV¾ŸÁ&F<0 AØ–ª¬Œ¦®ø– À¬ŽÄæ€ôÌž²€Î†œdP>Œ&vèÞèþØò˜¶¨ŽÚºÄÚÊÒAðª