RYHPT44611T&)4>4 NyLq7'^P0"2@8000T IT kH Xp0 00M0f00h0 0{000Z$   000 0 @(03(0 ! P0F0)000 @0W0}0@0$0& F*0~*000&.0/0* 00020_@0u40@000;8 0q0K?0 4 (    Bx000E0 @0 0: 0L0b00zL0M0N00(0W08@HLP")=Sdv $(,04 8 <6 @N [ Dm   W W`    0 @ P) h9 lW _ W _ W _ W _ "W _ e n y  ( 8 @ P `+ bW _ !W _ (W _ (W _ 8L W "V d d q  #   W W Sq           ) 7 C N V a *k +y )( ,8 HW _ -W _ .W _ BW _ W     ( /1 Q 0( 8n W _ :W _ P  "   [ X  &  W  )9 "5F0=C WC sC C  C@ C` C C #Q32E@W>h= W _ 3zW W$W(W,DW _ 4%6GI(TH,4`G`ly  K   0 0 JJ$ 0# 0, B L[p    $ 0 0 0 0  0 0 0 0& 05 0BXiNx(,pW _  W  )9Ux@W W VW _ T( 1(9,B K Xft PCharPContextSwitchPInt32PLightTypePRenderDataTypePSceneRenderPassTypePShadowCasterTypePTextureFormatBasePUInt16PUInt32PUInt8boolfloatCD3D11_BLEND_DESCCD3D11_DEPTH_STENCIL_DESCCD3D11_RASTERIZER_DESCD3D11_DEPTH_STENCILOP_DESCD3D11_RENDER_TARGET_BLEND_DESCPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPArrayPAssetReferencePBasePClassDescriptorPClusterHeaderPClusterHeaderBasePClusterHeaderD3D11PContextVariantFoldingTablePEffectPEffectVariantPInstanceListHeaderPMaterialPMaterialSwitchPNodeContextPParameterBufferPParameterBufferBasePSamplerStatePSamplerStateBasePSamplerStateD3D11PSceneRenderPassPShaderPShaderComputeProgramPShaderComputeProgramD3D11PShaderFragmentProgramPShaderFragmentProgramD3D11PShaderGeometryProgramPShaderGeometryProgramD3D11PShaderParameterCaptureBufferLocationPShaderParameterCaptureBufferLocationSizePShaderParameterCaptureBufferLocationTypeConstantBufferPShaderParameterCaptureBufferSamplerPShaderParameterCaptureBufferTexture2DPShaderParameterCaptureBufferTextureBasePShaderParameterDefinitionPShaderPassPShaderPassBasePShaderPassD3D11PShaderPassInfoPShaderPassParameterLocationTypesBasePShaderPassParameterLocationTypesConstantBufferPShaderPassStateBasePShaderPassStateD3D11PShaderProgramBasePShaderProgramD3D11PShaderStreamDefinitionPShaderVertexProgramPShaderVertexProgramD3D11PSharrayPStreamInputDescD3D11PStreamInputLayoutD3D11PStringPTexture2DPTexture2DBasePTexture2DD3D11PTextureCommonBasem_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_formatm_memoryTypem_mipmapCountm_maxMipLevelm_textureFlags` p hh  @@PP!@@%&'@+x@8-5P0 C`HDPGw`Data/Shaders/S_Trail_vs__Trail_fs__0.cgfx#materialData/Shaders/S_Trail_vs__Trail_fs__0.fx #line 1 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #define D_PLATFORM_D3D11x64 // 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 // ------------------------------------------------------------------------------------------------------------------------------------------ #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 53 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" // From Phyre: // From environment: float4 f_se; float4 f_cc, f_fc; // Input/output structs struct a2v { float4 position : POSITION; float4 color : COLOR0; float3 normal : NORMAL; }; struct v2f { float4 position : POSITION_OUT; float4 color : COLOR0; float3 normal : TEXCOORD1; float3 eye : TEXCOORD2; float3 loc : TEXCOORD3; float4 fog : TEXCOORD4; }; // Program entry void main( in a2v IN, out v2f OUT ) { // Transform point into clipSpace float3 vPosition = IN.position.xyz; OUT.position = MatrixMul(modelViewProj, float4(vPosition, 1.0f) ); OUT.color = IN.color; float4 pos = MatrixMul( model, float4(vPosition, 1.0f) ); OUT.eye = eyePositionWS.xyz - pos.xyz; OUT.normal = IN.normal; //float light = saturate(dot( IN.normal, normalize( float3( 0, 1, 0 ) ) )); //OUT.color.rgb = light * OUT.color.rgb; OUT.loc.xyz = IN.position.xyz; // Fog float hc = eyePositionWS.y - f_se.z; float h = pos.y - f_se.z; float H = f_se.w - f_se.z; float fogY = 0.5 * (1 - saturate( h / H ) + 1 - saturate( hc / H )); fogY *= (h>hc)?saturate( (H - hc) / (h - hc) ):saturate( (H - h) / (hc - h) ); float fogRatio = saturate( (fogY * length( OUT.eye.xyz ) - f_se.x) / (f_se.y - f_se.x) ); fogRatio *= fogRatio; float4 fogColorAlpha = lerp( f_cc, f_fc, fogRatio ); OUT.fog = float4( fogColorAlpha.rgb, fogRatio*fogColorAlpha.a ); } // ------------------------------------------------------------------------------------------------------------------------------------------ #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 // ------------------------------------------------------------------------------------------------------------------------------------------ #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 120 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" // Env params: float4 l_c,l_a; float3 l_d; float velvetInt, velvetRatio; float terrainScale; D_DECLARE_TEXTURE2D_4(terrainHeightMap); D_DECLARE_TEXTURE2D_4(texColorShadow); struct v2f { float4 position : POSITION_OUT; float4 color : COLOR0; float3 normal : TEXCOORD1; float3 eye : TEXCOORD2; float3 loc : TEXCOORD3; float4 fog : TEXCOORD4; }; struct f2f { float4 color : FINAL_COLOR; }; //---------------------------------------------- // Program entry //---------------------------------------------- void main( in v2f IN, out f2f OUT ) { //IN.color *= 0.5; //@HACK: Reducing the occlusion range looks better in lvl 1. float4 aoColor = float4( (IN.color - 0.5) * 0.125 + 0.5 ); // The occlusion contrast generated by dune geo is quite low. float3 Ln = normalize( l_d ); float3 Nn = normalize( IN.normal ); float3 Vn = normalize( IN.eye.xyz ); float3 Hn = normalize( Vn + Ln ); float specRatio = velvetRatio/3; float4 litV = lit( dot( Ln, Nn ), dot( Hn, Nn ), specRatio ); float glitterSpec = 5*litV.y * litV.z * velvetInt; //TOON shader float high = 0.05; float low = 0; //float lightInt = (litV.y>high)?1:(litV.y<=low)?0:(litV.y-low)/(high-low); //float lightInt = (litV.y>0)?1:0; float lightInt = 1; //velvet float cosView = saturate(dot( Vn, Nn )); float velvet = velvetInt * pow( 1.0 - cosView * cosView, 2 * velvetRatio ); float glitterVelvet = velvetInt*pow( 1.0 - cosView * cosView, specRatio ); //velvet = 0; float distFade = 1.0 / (length( IN.eye.xyz )+0.001); distFade = saturate( 15 * distFade * distFade ); float kHeightAboveTerrain = 0.05; float kMaxDepth = 0.12/distFade; float terrainX = 1 - ( terrainScale * IN.loc.x + 0.5 ) / 256; float terrainZ = ( terrainScale * IN.loc.z + 0.5 ) / 512; //float heightVal = 2 * ( IN.color.r - 0.5 ); // Use dune cell texture for ao lookup float heightVal = 5 * ( aoColor.r - 0.5 ) * min(2,length(IN.eye)*.075); float4 duneMap = D_SAMPLE_TEXTURE( texColorShadow, float2( terrainX, terrainZ ) ); float3 midColor = duneMap.rgb; float luminance = dot( midColor, float3( 0.59, 0.3, 0.11 ) ); float3 lowColor = lerp( float3( luminance, luminance, luminance ), midColor, 1.25 ); // This last number affects the saturation float3 highColor = midColor; lowColor *= 0.5; highColor *= 1.25; float3 duneColor = ( heightVal < 0 ) ? lerp( midColor, lowColor, -heightVal ) : lerp( midColor, highColor, heightVal ); float2 uv; uv.x = IN.loc.x / 256; uv.y = IN.loc.z / 512; float4 color; float shadow = saturate( duneMap.a ); velvet = 0.7*velvet + 0.3*saturate( velvet * 20 * heightVal ); color.rgb = duneColor * ( ( lightInt + velvet ) * l_c.rgb * shadow + l_a.rgb ); OUT.color.rgb = lerp( color.rgb, IN.fog.rgb, IN.fog.a ); OUT.color.a = 1; } // ------------------------------------------------------------------------------------------------------------------------------------------ #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_Trail_vs__Trail_fs__0.fxGGGGGGGG?????AA?pP05spDXBCM.d[_%[b8L<RDEF <ARD11< ($   LinearClampSamplertexColorShadow$GlobalsPP@`@@`@`@`@@` @`4X4ky~ 0 <4@4D4viewfloat4x4UprojectionviewprojectioneyeDirectionWSfloat4eyePositionWSeyePositionOScameraNearmodelITmodelmodelViewProjcameraNearTimesFarfloat.cameraFarMinusNearcameraNearFarf_sef_ccf_fcl_cl_al_dfloat3velvetIntvelvetRatioterrainScaleMicrosoft (R) HLSL Shader Compiler 10.1ISGNSV_POSITIONCOLORTEXCOORDOSGN, SV_TARGETSHEX PhjYF %Z` XpUUbbrbrbRbe h6@  8 @> @?"FFD"8VFFD 8rF+@"F4"@3"@?8"6"A"@?+B@8B* $/"8"*"8": #+B@8  $:@?+@: 6:A:*8B* $B*@?+@"*:+B@6@: 8 *+B@FFK:8:@=3B:*8* ECUFF~` 6rF BF@= ?>G=6r ArFF8 rF@???r F6rF8 rF@???8 rF@???+B@1B *6 A6rFArFF8rFrFF6rFArFF8rFrFF7 r FF4B:@3B*@?8@333?+@8" 8 4 @3 @?8 @> : :8F !8r FrFF "8rFF6rFArFF8rFr FF+ @>STATWH SPDBMicrosoft C/C++ MSF 7.00 DSKPI8 <.1_^`ΐ~BY1Q3E ; 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 0ZLdPh&Q79A$A5VU8ʳ#line 1 "D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Trail_vs__Trail_fs__0.fx" #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #line 4 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 506 float4x4 view : view ; float4x4 projection : projection ; float4x4 viewprojection : viewprojection ; float4 eyeDirectionWS : eyeDirectionWS ; float4 eyePositionWS : eyePositionWS ; float4 eyePositionOS : eyePositionOS ; float4 cameraNear : cameraNearFar ; float4x4 modelIT : modelit ; float4x4 model : model ; float4x4 modelViewProj : modelviewproj ; #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 52 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #line 55 float4 f_se ; float4 f_cc , f_fc ; #line 59 struct Opaque_vs_a2v { float4 position : POSITION ; float4 color : COLOR0 ; float3 normal : NORMAL ; } ; struct Opaque_vs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float3 normal : TEXCOORD1 ; float3 eye : TEXCOORD2 ; float3 loc : TEXCOORD3 ; float4 fog : TEXCOORD4 ; } ; #line 77 void Opaque_vs_main ( in Opaque_vs_a2v Opaque_vs_IN , out Opaque_vs_v2f Opaque_vs_OUT ) { float3 vPosition = Opaque_vs_IN . position . xyz ; Opaque_vs_OUT . position = mul ( float4 ( vPosition , 1.0f ) , modelViewProj ) ; Opaque_vs_OUT . color = Opaque_vs_IN . color ; float4 pos = mul ( float4 ( vPosition , 1.0f ) , model ) ; Opaque_vs_OUT . eye = eyePositionWS . xyz - pos . xyz ; Opaque_vs_OUT . normal = Opaque_vs_IN . normal ; #line 90 Opaque_vs_OUT . loc . xyz = Opaque_vs_IN . position . xyz ; #line 93 float hc = eyePositionWS . y - f_se . z ; float h = pos . y - f_se . z ; float H = f_se . w - f_se . z ; float fogY = 0.5 * ( 1 - saturate ( h / H ) + 1 - saturate ( hc / H ) ) ; fogY *= ( h > hc ) ? saturate ( ( H - hc ) / ( h - hc ) ) : saturate ( ( H - h ) / ( hc - h ) ) ; float fogRatio = saturate ( ( fogY * length ( Opaque_vs_OUT . eye . xyz ) - f_se . x ) / ( f_se . y - f_se . x ) ) ; fogRatio *= fogRatio ; float4 fogColorAlpha = lerp ( f_cc , f_fc , fogRatio ) ; Opaque_vs_OUT . fog = float4 ( fogColorAlpha . rgb , fogRatio * fogColorAlpha . a ) ; } #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 642 #line 119 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" float4 l_c , l_a ; float3 l_d ; float velvetInt , velvetRatio ; float terrainScale ; Texture2D < float4 > terrainHeightMap ; Texture2D < float4 > texColorShadow ; struct Opaque_fs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float3 normal : TEXCOORD1 ; float3 eye : TEXCOORD2 ; float3 loc : TEXCOORD3 ; float4 fog : TEXCOORD4 ; } ; struct Opaque_fs_f2f { float4 color : SV_TARGET0 ; } ; #line 147 void Opaque_fs_main ( in Opaque_fs_v2f Opaque_fs_IN , out Opaque_fs_f2f Opaque_fs_OUT ) { float4 aoColor = float4 ( ( Opaque_fs_IN . color - 0.5 ) * 0.125 + 0.5 ) ; float3 Ln = normalize ( l_d ) ; float3 Nn = normalize ( Opaque_fs_IN . normal ) ; float3 Vn = normalize ( Opaque_fs_IN . eye . xyz ) ; float3 Hn = normalize ( Vn + Ln ) ; float specRatio = velvetRatio / 3 ; float4 litV = lit ( dot ( Ln , Nn ) , dot ( Hn , Nn ) , specRatio ) ; float glitterSpec = 5 * litV . y * litV . z * velvetInt ; #line 161 float high = 0.05 ; float low = 0 ; #line 165 float lightInt = 1 ; #line 168 float cosView = saturate ( dot ( Vn , Nn ) ) ; float velvet = velvetInt * pow ( 1.0 - cosView * cosView , 2 * velvetRatio ) ; float glitterVelvet = velvetInt * pow ( 1.0 - cosView * cosView , specRatio ) ; #line 173 float distFade = 1.0 / ( length ( Opaque_fs_IN . eye . xyz ) + 0.001 ) ; distFade = saturate ( 15 * distFade * distFade ) ; float kHeightAboveTerrain = 0.05 ; float kMaxDepth = 0.12 / distFade ; float terrainX = 1 - ( terrainScale * Opaque_fs_IN . loc . x + 0.5 ) / 256 ; float terrainZ = ( terrainScale * Opaque_fs_IN . loc . z + 0.5 ) / 512 ; #line 184 float heightVal = 5 * ( aoColor . r - 0.5 ) * min ( 2 , length ( Opaque_fs_IN . eye ) * .075 ) ; float4 duneMap = texColorShadow . Sample ( LinearClampSampler , float2 ( terrainX , terrainZ ) ) ; float3 midColor = duneMap . rgb ; float luminance = dot ( midColor , float3 ( 0.59 , 0.3 , 0.11 ) ) ; float3 lowColor = lerp ( float3 ( luminance , luminance , luminance ) , midColor , 1.25 ) ; float3 highColor = midColor ; lowColor *= 0.5 ; highColor *= 1.25 ; float3 duneColor = ( heightVal < 0 ) ? lerp ( midColor , lowColor , - heightVal ) : lerp ( midColor , highColor , heightVal ) ; float2 uv ; uv . x = Opaque_fs_IN . loc . x / 256 ; uv . y = Opaque_fs_IN . loc . z / 512 ; float4 color ; float shadow = saturate ( duneMap . a ) ; velvet = 0.7 * velvet + 0.3 * saturate ( velvet * 20 * heightVal ) ; color . rgb = duneColor * ( ( lightInt + velvet ) * l_c . rgb * shadow + l_a . rgb ) ; Opaque_fs_OUT . color . rgb = lerp ( color . rgb , Opaque_fs_IN . fog . rgb , Opaque_fs_IN . fog . a ) ; Opaque_fs_OUT . color . a = 1 ; } 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 244 +D:\Dev\TGC\Journey\head\Journey\shaderd:\dev\tgc\journey\head\journey\shader#line 1 "D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Trail_vs__Trail_fs__0.fx" #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #line 4 BlendState ourBlendState { BlendEnable [ 0 ] = FALSE ; BlendEnable [ 1 ] = FALSE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = ON0)(0Iv l*()B< G GMicrosoft (R) HLSL Shader Compiler 10.1^=hlslFlags0x4005hlslTargetps_5_0hlslEntryOpaque_fs_mainhlslDefines /DPHYRE_D3DFX=16l   Opaque_fs_main2> Opaque_fs_INP P P P  P P P P P  P$ $P( (P, 0P0 4P4 8P8 @P< DP@ HPD PPH TPL XPP \6> Opaque_fs_OUTP P P P  .>aoColorPL*>NnP<|P<P< *>VnPPpP.>@lightIntP.>@cosViewP.>@velvetP$P.>@terrainXP.>@terrainZPx2>@heightValP(.>duneMapP8 P8$P8(P ,.>midColorP0$ P0$$P0$(2>@luminancePX.>lowColorPPP2>highColorPP PP$PP(P40P44P482>duneColorPxPxPx.>colorP P P .>@shadowP00sr'^GAO;* +T+@ 4    <<XXll  $$@@TTtt  ((<<XXpp    <<XXll00XXpp  44HHdd||88TTxx44PPll   4 4 P P l l N!:N!:NDNJ535353868686 2 .2020R,<R&<R&<R@NR@NR PR PR PRPPNP@PFPNPNPNPNL<LBLJLJd/d-d-d/d3bd=Yd=Yd=`d3bdbfd% #GE_]_]_]_]! 1&1&1$.101010101/1/1/1/1/-+-+HH.8H.8H.DH#FH#FHFHFZ#3Z!AZ!JZ!VZXl#jl#jl#jl#j#! H`x 18 LLT@float4@ float3j position color  normal ,eye 8loc Dfog"TOpaque_fs_v2f color"Opaque_fs_f2f          @    18  "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 506 float4x4 view : view ; float4x4 projection : projection ; float4x4 viewprojection : viewprojection ; float4 eyeDirectionWS : eyeDirectionWS ; float4 eyePositionWS : eyePositionWS ; float4 eyePositionOS : eyePositionOS ; float4 cameraNear : cameraNearFar ; float4x4 modelIT : modelit ; float4x4 model : model ; float4x4 modelViewProj : modelviewproj ; #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 52 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #line 55 float4 f_se ; float4 f_cc , f_fc ; #line 59 struct Opaque_vs_a2v { float4 position : POSITION ; float4 color : COLOR0 ; float3 normal : NORMAL ; } ; struct Opaque_vs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float3 normal : TEXCOORD1 ; float3 eye : TEXCOORD2 ; float3 loc : TEXCOORD3 ; float4 fog : TEXCOORD4 ; } ; #line 77 void Opaque_vs_main ( in Opaque_vs_a2v Opaque_vs_IN , out Opaque_vs_v2f Opaque_vs_OUT ) { float3 vPosition = Opaque_vs_IN . position . xyz ; Opaque_vs_OUT . position = mul ( float4 ( vPosition , 1.0f ) , modelViewProj ) ; Opaque_vs_OUT . color = Opaque_vs_IN . color ; float4 pos = mul ( float4 ( vPosition , 1.0f ) , model ) ; Opaque_vs_OUT . eye = eyePositionWS . xyz - pos . xyz ; Opaque_vs_OUT . normal = Opaque_vs_IN . normal ; #line 90 Opaque_vs_OUT . loc . xyz = Opaque_vs_IN . position . xyz ; #line 93 float hc = eyePositionWS . y - f_se . z ; float h = pos . y - f_se . z ; float H = f_se . w - f_se . z ; float fogY = 0.5 * ( 1 - saturate ( h / H ) + 1 - saturate ( hc / H ) ) ; fogY *= ( h > hc ) ? saturate ( ( H - hc ) / ( h - hc ) ) : saturate ( ( H - h ) / ( hc - h ) ) ; float fogRatio = saturate ( ( fogY * length ( Opaque_vs_OUT . eye . xyz ) - f_se . x ) / ( f_se . y - f_se . x ) ) ; fogRatio *= fogRatio ; float4 fogColorAlpha = lerp ( f_cc , f_fc , fogRatio ) ; Opaque_vs_OUT . fog = float4 ( fogColorAlpha . rgb , fogRatio * fogColorAlpha . a ) ; } #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 642 #line 119 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" float4 l_c , l_a ; float3 l_d ; float velvetInt , velvetRatio ; float terrainScale ; Texture2D < float4 > terrainHeightMap ; Texture2D < float4 > texColorShadow ; struct Opaque_fs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float3 normal : TEXCOORD1 ; float3 eye : TEXCOORD2 ; float3 loc : TEXCOORD3 ; float4 fog : TEXCOORD4 ; } ; struct Opaque_fs_f2f { float4 color : SV_TARGET0 ; } ; #line 147 void Opaque_fs_main ( in Opaque_fs_v2f Opaque_fs_IN , out Opaque_fs_f2f Opaque_fs_OUT ) { float4 aoColor = float4 ( ( Opaque_fs_IN . color - 0.5 ) * 0.125 + 0.5 ) ; float3 Ln = normalize ( l_d ) ; float3 Nn = normalize ( Opaque_fs_IN . normal ) ; float3 Vn = normalize ( Opaque_fs_IN . eye . xyz ) ; float3 Hn = normalize ( Vn + Ln ) ; float specRatio = velvetRatio / 3 ; float4 litV = lit ( dot ( Ln , Nn ) , dot ( Hn , Nn ) , specRatio ) ; float glitterSpec = 5 * litV . y * litV . z * velvetInt ; #line 161 float high = 0.05 ; float low = 0 ; #line 165 float lightInt = 1 ; #line 168 float cosView = saturate ( dot ( Vn , Nn ) ) ; float velvet = velvetInt * pow ( 1.0 - cosView * cosView , 2 * velvetRatio ) ; float glitterVelvet = velvetInt * pow ( 1.0 - cosView * cosView , specRatio ) ; #line 173 float distFade = 1.0 / ( length ( Opaque_fs_IN . eye . xyz ) + 0.001 ) ; distFade = saturate ( 15 * distFade * distFade ) ; float kHeightAboveTerrain = 0.05 ; float kMaxDepth = 0.12 / distFade ; float terrainX = 1 - ( terrainScale * Opaque_fs_IN . loc . x + 0.5 ) / 256 ; float terrainZ = ( terrainScale * Opaque_fs_IN . loc . z + 0.5 ) / 512 ; #line 184 float heightVal = 5 * ( aoColor . r - 0.5 ) * min ( 2 , length ( Opaque_fs_IN . eye ) * .075 ) ; float4 duneMap = texColorShadow . Sample ( LinearClampSampler , float2 ( terrainX , terrainZ ) ) ; float3 midColor = duneMap . rgb ; float luminance = dot ( midColor , float3 ( 0.59 , 0.3 , 0.11 ) ) ; float3 lowColor = lerp ( float3 ( luminance , luminance , luminance ) , midColor , 1.25 ) ; float3 highColor = midColor ; lowColor *= 0.5 ; highColor *= 1.25 ; float3 duneColor = ( heightVal < 0 ) ? lerp ( midColor , lowColor , - heightVal ) : lerp ( midColor , highColor , heightVal ) ; float2 uv ; uv . x = Opaque_fs_IN . loc . x / 256 ; uv . y = Opaque_fs_IN . loc . z / 512 ; float4 color ; float shadow = saturate ( duneMap . a ) ; velvet = 0.7 * velvet + 0.3 * saturate ( velvet * 20 * heightVal ) ; color . rgb = duneColor * ( ( lightInt + velvet ) * l_c . rgb * shadow + l_a . rgb ) ; Opaque_fs_OUT . color . rgb = lerp ( color . rgb , Opaque_fs_IN . fog . rgb , Opaque_fs_IN . fog . a ) ; Opaque_fs_OUT . color . a = 1 ; } 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 244 D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Trail_vs__Trail_fs__0.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh (P* +)T+D3DSHDR ` /@$!Iay@P $0<HT%Opaque_fs_main&Q  LinearClampSamplerQ l_cQ  l_aQ<velvetIntQ@velvetRatio"QDterrainScale"QtexColorShadow4 /  ` p Opaque_fs_mainnonew 1 ?\T , ` p Opaque_fs_mainnone-.= `aq 'wD:\Dev\TGC\Journey\head\Journey\shaderD:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Trail_vs__Trail_fs__0.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh.1_^`ΐ~BY1T/LinkInfo/names/src/headerblock/src/files/d:\dev\tgc\journey\head\journey\shader" Q3 #8+l* T(t,G*FE+,-./0123456789:;<=>?  !"#$%&'()@ABDCHP 8@@1@1@1p0 <@`|DP@0  @@1`@1 @1@@1@1@1p0 <@`|DP@0  @@1`@1 @184 4P4h444444484 4P4h44 44444@`@P@@@0@ @ @p 0@<@@@|DG4G4G4G4G4G4G4hG4PB48B4 1@@1`@1 @AnisoClampSamplerLinearClampSamplerLinearWrapAnisoSamplerLinearWrapSamplerLinearWrapTSamplerPointClampSamplerPointWrapAnisoSamplerPointWrapSamplercameraNeareyePositionOSf_ccf_fcf_sel_al_cl_dmodelmodelITmodelViewProjterrainHeightMapterrainScaletexColorShadowvelvetIntvelvetRatio   05sv05spOpaque_fs_mainOpaque_vs_mainPj 8COLORNORMALPOSITIONP05svDXBCDa1vNKLc8\RDEFh<ARD11< ($ \$Globals\P@$@@/@>TxTTT@@@@ TTT#T(T, T00 <`<j@vDviewfloat4x4projectionviewprojectioneyeDirectionWSfloat4MeyePositionWSeyePositionOScameraNearmodelITmodelmodelViewProjcameraNearTimesFarfloatcameraFarMinusNearcameraNearFarf_sef_ccf_fcl_cl_al_dfloat34velvetIntvelvetRatioterrainScaleMicrosoft (R) HLSL Shader Compiler 10.1ISGNhPY_POSITIONCOLORNORMALOSGNSV_POSITIONCOLORTEXCOORDSHEXPjYF !_r__rg e er er er e h6rF6@? FF " FF B FF  FF 6 FFF "FF BFF 6rFArFF 6r F6r F6* A: 6* A 6"* A": +B@ 4:@3:@?6:AB:*+@B:*:4:@3:@?6:AB:*8B*@?1: 6:A 6":A"  4 @3 @?6" A"6 A: :4:@3:@?7 : :8:*FFK 8: 6 A: 6 A  : 4:@3:@?8::6F AFF 8FFF 8 ::6r F6r F>STATF ;SPDBMicrosoft C/C++ MSF 7.00 DSKHG8 <.1_^ZL$C1`^Q3E ; 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 0ZL: dPh&A$}g!A#line 1 "D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Trail_vs__Trail_fs__0.fx" #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #line 4 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 506 float4x4 view : view ; float4x4 projection : projection ; float4x4 viewprojection : viewprojection ; float4 eyeDirectionWS : eyeDirectionWS ; float4 eyePositionWS : eyePositionWS ; float4 eyePositionOS : eyePositionOS ; float4 cameraNear : cameraNearFar ; float4x4 modelIT : modelit ; float4x4 model : model ; float4x4 modelViewProj : modelviewproj ; #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 52 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #line 55 float4 f_se ; float4 f_cc , f_fc ; #line 59 struct Opaque_vs_a2v { float4 position : POSITION ; float4 color : COLOR0 ; float3 normal : NORMAL ; } ; struct Opaque_vs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float3 normal : TEXCOORD1 ; float3 eye : TEXCOORD2 ; float3 loc : TEXCOORD3 ; float4 fog : TEXCOORD4 ; } ; #line 77 void Opaque_vs_main ( in Opaque_vs_a2v Opaque_vs_IN , out Opaque_vs_v2f Opaque_vs_OUT ) { float3 vPosition = Opaque_vs_IN . position . xyz ; Opaque_vs_OUT . position = mul ( float4 ( vPosition , 1.0f ) , modelViewProj ) ; Opaque_vs_OUT . color = Opaque_vs_IN . color ; float4 pos = mul ( float4 ( vPosition , 1.0f ) , model ) ; Opaque_vs_OUT . eye = eyePositionWS . xyz - pos . xyz ; Opaque_vs_OUT . normal = Opaque_vs_IN . normal ; #line 90 Opaque_vs_OUT . loc . xyz = Opaque_vs_IN . position . xyz ; #line 93 float hc = eyePositionWS . y - f_se . z ; float h = pos . y - f_se . z ; float H = f_se . w - f_se . z ; float fogY = 0.5 * ( 1 - saturate ( h / H ) + 1 - saturate ( hc / H ) ) ; fogY *= ( h > hc ) ? saturate ( ( H - hc ) / ( h - hc ) ) : saturate ( ( H - h ) / ( hc - h ) ) ; float fogRatio = saturate ( ( fogY * length ( Opaque_vs_OUT . eye . xyz ) - f_se . x ) / ( f_se . y - f_se . x ) ) ; fogRatio *= fogRatio ; float4 fogColorAlpha = lerp ( f_cc , f_fc , fogRatio ) ; Opaque_vs_OUT . fog = float4 ( fogColorAlpha . rgb , fogRatio * fogColorAlpha . a ) ; } #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 642 #line 119 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" float4 l_c , l_a ; float3 l_d ; float velvetInt , velvetRatio ; float terrainScale ; Texture2D < float4 > terrainHeightMap ; Texture2D < float4 > texColorShadow ; struct Opaque_fs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float3 normal : TEXCOORD1 ; float3 eye : TEXCOORD2 ; float3 loc : TEXCOORD3 ; float4 fog : TEXCOORD4 ; } ; struct Opaque_fs_f2f { float4 color : SV_TARGET0 ; } ; #line 147 void Opaque_fs_main ( in Opaque_fs_v2f Opaque_fs_IN , out Opaque_fs_f2f Opaque_fs_OUT ) { float4 aoColor = float4 ( ( Opaque_fs_IN . color - 0.5 ) * 0.125 + 0.5 ) ; float3 Ln = normalize ( l_d ) ; float3 Nn = normalize ( Opaque_fs_IN . normal ) ; float3 Vn = normalize ( Opaque_fs_IN . eye . xyz ) ; float3 Hn = normalize ( Vn + Ln ) ; float specRatio = velvetRatio / 3 ; float4 litV = lit ( dot ( Ln , Nn ) , dot ( Hn , Nn ) , specRatio ) ; float glitterSpec = 5 * litV . y * litV . z * velvetInt ; #line 161 float high = 0.05 ; float low = 0 ; #line 165 float lightInt = 1 ; #line 168 float cosView = saturate ( dot ( Vn , Nn ) ) ; float velvet = velvetInt * pow ( 1.0 - cosView * cosView , 2 * velvetRatio ) ; float glitterVelvet = velvetInt * pow ( 1.0 - cosView * cosView , specRatio ) ; #line 173 float distFade = 1.0 / ( length ( Opaque_fs_IN . eye . xyz ) + 0.001 ) ; distFade = saturate ( 15 * distFade * distFade ) ; float kHeightAboveTerrain = 0.05 ; float kMaxDepth = 0.12 / distFade ; float terrainX = 1 - ( terrainScale * Opaque_fs_IN . loc . x + 0.5 ) / 256 ; float terrainZ = ( terrainScale * Opaque_fs_IN . loc . z + 0.5 ) / 512 ; #line 184 float heightVal = 5 * ( aoColor . r - 0.5 ) * min ( 2 , length ( Opaque_fs_IN . eye ) * .075 ) ; float4 duneMap = texColorShadow . Sample ( LinearClampSampler , float2 ( terrainX , terrainZ ) ) ; float3 midColor = duneMap . rgb ; float luminance = dot ( midColor , float3 ( 0.59 , 0.3 , 0.11 ) ) ; float3 lowColor = lerp ( float3 ( luminance , luminance , luminance ) , midColor , 1.25 ) ; float3 highColor = midColor ; lowColor *= 0.5 ; highColor *= 1.25 ; float3 duneColor = ( heightVal < 0 ) ? lerp ( midColor , lowColor , - heightVal ) : lerp ( midColor , highColor , heightVal ) ; float2 uv ; uv . x = Opaque_fs_IN . loc . x / 256 ; uv . y = Opaque_fs_IN . loc . z / 512 ; float4 color ; float shadow = saturate ( duneMap . a ) ; velvet = 0.7 * velvet + 0.3 * saturate ( velvet * 20 * heightVal ) ; color . rgb = duneColor * ( ( lightInt + velvet ) * l_c . rgb * shadow + l_a . rgb ) ; Opaque_fs_OUT . color . rgb = lerp ( color . rgb , Opaque_fs_IN . fog . rgb , Opaque_fs_IN . fog . a ) ; Opaque_fs_OUT . color . a = 1 ; } 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 244 +D:\Dev\TGC\Journey\head\Journey\shaderd:\dev\tgc\journey\head\journey\shader#line 1 "D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Trail_vs__Trail_fs__0.fx" #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #line 4 BlendState ourBlendState { BlendEnable [ 0 ] = FALSE ; BlendEnable [ 1 ] = FALSE ; SrcBlend [ 0 ] = Src_Alpha ; DestBlend [ 0 ] = Inv_Src_Alpha ; BlendOp [ 0 ] = ADD ; SrcBlendAlpha [ 0 ] = ON0d)(0Iv l*()B< G GMicrosoft (R) HLSL Shader Compiler 10.1^=hlslFlags0x4005hlslTargetvs_5_0hlslEntryOpaque_vs_mainhlslDefines /DPHYRE_D3DFX=16``Opaque_vs_main2> Opaque_vs_INP`P`P`P ` P`P`P`P`P ` P$`$P(`(6> Opaque_vs_OUTPD`PPH`TPL`XPP`\P8`@P<`DP@`HP,`0P0`4P4`8P ` P$`$P(`(P`P`P`P`P`P`P`P ` P,P0P42>vPositionP P P *>posPpPP$*>@hcPL$ *>@hP*>@HP|*>@fogYP0PL .>@fogRatioP 6>fogColorAlphaPHPHPHP H0sr'^GAO;* +T+ PPQQQQQQQQQQ<R<RPSPSpSpSSSTTTTUUZZ]],],]L^L^h^h^____aaaaaa a a(a(a@a@a\a\apapaaaaaaaaaaaaa0b0bLbLbdbdbbbbbbbbbbbbb b b<b<bTbTbpbpbbbbbbbbbdd d d4d4dPdPdldldddddddddddee4f4fPfPfpfpfffgggghhhh6 4T RT RT RT RT R20><><><;9;942?=-+-+" " #!#!M/M)-M/M/M/M/M3M3MBGM7IM7IMIMIMKee',e',e49e49e%;e=e=eNReNReZ_eZ_eLaeAceAce cecx*Mx*Mx#Mx#Xx#Xx`rx`rx!txvxv<:<:<:<:Y:UYW D` 18 88@@float4@ float3: position color  normal",Opaque_vs_a2vj position color  normal ,eye 8loc Dfog"TOpaque_vs_v2f    @@float4x4     18  "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 506 float4x4 view : view ; float4x4 projection : projection ; float4x4 viewprojection : viewprojection ; float4 eyeDirectionWS : eyeDirectionWS ; float4 eyePositionWS : eyePositionWS ; float4 eyePositionOS : eyePositionOS ; float4 cameraNear : cameraNearFar ; float4x4 modelIT : modelit ; float4x4 model : model ; float4x4 modelViewProj : modelviewproj ; #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 52 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" #line 55 float4 f_se ; float4 f_cc , f_fc ; #line 59 struct Opaque_vs_a2v { float4 position : POSITION ; float4 color : COLOR0 ; float3 normal : NORMAL ; } ; struct Opaque_vs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float3 normal : TEXCOORD1 ; float3 eye : TEXCOORD2 ; float3 loc : TEXCOORD3 ; float4 fog : TEXCOORD4 ; } ; #line 77 void Opaque_vs_main ( in Opaque_vs_a2v Opaque_vs_IN , out Opaque_vs_v2f Opaque_vs_OUT ) { float3 vPosition = Opaque_vs_IN . position . xyz ; Opaque_vs_OUT . position = mul ( float4 ( vPosition , 1.0f ) , modelViewProj ) ; Opaque_vs_OUT . color = Opaque_vs_IN . color ; float4 pos = mul ( float4 ( vPosition , 1.0f ) , model ) ; Opaque_vs_OUT . eye = eyePositionWS . xyz - pos . xyz ; Opaque_vs_OUT . normal = Opaque_vs_IN . normal ; #line 90 Opaque_vs_OUT . loc . xyz = Opaque_vs_IN . position . xyz ; #line 93 float hc = eyePositionWS . y - f_se . z ; float h = pos . y - f_se . z ; float H = f_se . w - f_se . z ; float fogY = 0.5 * ( 1 - saturate ( h / H ) + 1 - saturate ( hc / H ) ) ; fogY *= ( h > hc ) ? saturate ( ( H - hc ) / ( h - hc ) ) : saturate ( ( H - h ) / ( hc - h ) ) ; float fogRatio = saturate ( ( fogY * length ( Opaque_vs_OUT . eye . xyz ) - f_se . x ) / ( f_se . y - f_se . x ) ) ; fogRatio *= fogRatio ; float4 fogColorAlpha = lerp ( f_cc , f_fc , fogRatio ) ; Opaque_vs_OUT . fog = float4 ( fogColorAlpha . rgb , fogRatio * fogColorAlpha . a ) ; } #line 0 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh" #line 642 #line 119 "D:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fx" float4 l_c , l_a ; float3 l_d ; float velvetInt , velvetRatio ; float terrainScale ; Texture2D < float4 > terrainHeightMap ; Texture2D < float4 > texColorShadow ; struct Opaque_fs_v2f { float4 position : SV_POSITION ; float4 color : COLOR0 ; float3 normal : TEXCOORD1 ; float3 eye : TEXCOORD2 ; float3 loc : TEXCOORD3 ; float4 fog : TEXCOORD4 ; } ; struct Opaque_fs_f2f { float4 color : SV_TARGET0 ; } ; #line 147 void Opaque_fs_main ( in Opaque_fs_v2f Opaque_fs_IN , out Opaque_fs_f2f Opaque_fs_OUT ) { float4 aoColor = float4 ( ( Opaque_fs_IN . color - 0.5 ) * 0.125 + 0.5 ) ; float3 Ln = normalize ( l_d ) ; float3 Nn = normalize ( Opaque_fs_IN . normal ) ; float3 Vn = normalize ( Opaque_fs_IN . eye . xyz ) ; float3 Hn = normalize ( Vn + Ln ) ; float specRatio = velvetRatio / 3 ; float4 litV = lit ( dot ( Ln , Nn ) , dot ( Hn , Nn ) , specRatio ) ; float glitterSpec = 5 * litV . y * litV . z * velvetInt ; #line 161 float high = 0.05 ; float low = 0 ; #line 165 float lightInt = 1 ; #line 168 float cosView = saturate ( dot ( Vn , Nn ) ) ; float velvet = velvetInt * pow ( 1.0 - cosView * cosView , 2 * velvetRatio ) ; float glitterVelvet = velvetInt * pow ( 1.0 - cosView * cosView , specRatio ) ; #line 173 float distFade = 1.0 / ( length ( Opaque_fs_IN . eye . xyz ) + 0.001 ) ; distFade = saturate ( 15 * distFade * distFade ) ; float kHeightAboveTerrain = 0.05 ; float kMaxDepth = 0.12 / distFade ; float terrainX = 1 - ( terrainScale * Opaque_fs_IN . loc . x + 0.5 ) / 256 ; float terrainZ = ( terrainScale * Opaque_fs_IN . loc . z + 0.5 ) / 512 ; #line 184 float heightVal = 5 * ( aoColor . r - 0.5 ) * min ( 2 , length ( Opaque_fs_IN . eye ) * .075 ) ; float4 duneMap = texColorShadow . Sample ( LinearClampSampler , float2 ( terrainX , terrainZ ) ) ; float3 midColor = duneMap . rgb ; float luminance = dot ( midColor , float3 ( 0.59 , 0.3 , 0.11 ) ) ; float3 lowColor = lerp ( float3 ( luminance , luminance , luminance ) , midColor , 1.25 ) ; float3 highColor = midColor ; lowColor *= 0.5 ; highColor *= 1.25 ; float3 duneColor = ( heightVal < 0 ) ? lerp ( midColor , lowColor , - heightVal ) : lerp ( midColor , highColor , heightVal ) ; float2 uv ; uv . x = Opaque_fs_IN . loc . x / 256 ; uv . y = Opaque_fs_IN . loc . z / 512 ; float4 color ; float shadow = saturate ( duneMap . a ) ; velvet = 0.7 * velvet + 0.3 * saturate ( velvet * 20 * heightVal ) ; color . rgb = duneColor * ( ( lightInt + velvet ) * l_c . rgb * shadow + l_a . rgb ) ; Opaque_fs_OUT . color . rgb = lerp ( color . rgb , Opaque_fs_IN . fog . rgb , Opaque_fs_IN . fog . a ) ; Opaque_fs_OUT . color . a = 1 ; } 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 244 D:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Trail_vs__Trail_fs__0.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh (P* +)T+D3DSHDR ` /8 Ea!@@ $0<H%Opaque_vs_main"Q eyePositionWSQ @model"Q modelViewProjQ f_seQ f_ccQ f_fc /  ` Opaque_vs_mainnonew 1 ?\T , ` Opaque_vs_mainnone-. `7'wD:\Dev\TGC\Journey\head\Journey\shaderD:\\Dev\\TGC\\Journey\\head\\Journey\\Data\\Shaders\\S_Trail_vs__Trail_fs__0.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/S_Trail_vs__Trail_fs__0.fxD:/Dev/TGC/Journey/head/Journey/Data/Shaders/Migratory.sh.1_^ZL$C1`^T/LinkInfo/names/src/headerblock/src/files/d:\dev\tgc\journey\head\journey\shader" Q3 #8+l*@(h,E(DC)*+,-./0123456789:;<=  !"#$%&'>?@BAFCOLORNORMALPOSITIONPEffectVariantPMaterialOpaqueVertexColorNormal   ' -`P@0 p|5555555h5P686 1XhX1PXZPAP P XXXP1 XXXXXXXXHP!PAP! PaXX PQ P P P , P 6 hPha4AdP>&vA