Was going through material editor (sry if it's the wrong forum category). I saw that small box saying "physics id", seeing that we were able to change for asphalt to turbo. I question went to my mind. Are we / will we able to create custom physics (even if it not casual user-friendly). During my reasearch for material I only found the material lib and a bunch of gbx that we can obviously not really use to understand how to makes new physics. Also, will we be able to create physics through code that could change car properties such as acceleration for example.
Found that, don't really now what to think about
Code: Select all
//#include "Common.Phlsl.txt"
#include "Techno3\Media\Text\PHLSL\Tech3 Common.PHlsl.Inc.Txt"
// pas si simple: cShadow / binding a def.
// #include "Effects\Media\Text\PHlsl\ShadowPssm.PHlsl.Inc.Txt"
struct PS_INPUT {
float4 RasterPos : SV_Position;
float4 Color0 : COLOR0;
float2 TexCoord0 : TEXCOORD0;
float2 TexCoord1 : TEXCOORD1;
float4 TcShadow : TEXCOORD2;
};
struct PS_OUTPUT {
fpart4 Color : SV_Target0;
};
SamplerState SMapStem;
Texture2D TMapStem;
#include "Techno3\Media\Text\PHLSL\Tech3 CommonShadow.PHlsl.Inc.txt"
PS_OUTPUT psMain(const PS_INPUT v) // ps_2_0
{
const fpart4 Stem0 = TMapStem.Sample(SMapStem, v.TexCoord0);
const fpart4 Stem1 = TMapStem.Sample(SMapStem, v.TexCoord1);
SShadow Shadow;
if (MMwIsEnabled(DUseDeferring) && 0)
{ // Image space: c'est plus compliqué:
// le PSSM est appliquée au fond de l'eau, pas à la surface
// => PSSM custom ?
Shadow = GetShadowFromLightMask(v.RasterPos.xy);
}
else {
Shadow = GetShadowFromLightDepth(v.TcShadow);
}
float Opacity = v.Color0.a*saturate(Stem0.a + Stem1.a);
float3 mDiffuse= v.Color0.rgb;
float3 nNormalInW = float3(0,1,0);
float3 LDiffusAmb = GbxP_LightAmbientLinear.rgb; // better ?
LDiffusAmb *= Shadow.AmbientOcc; // on occlude avant LDir0 (pb avec Light Direct Local : faussement occludé)
float3 LDiffusDir0;
LDiffusDir0 = GbxP_LightDirRgbLinear0.rgb*Shadow.LDir0_Specular;
LDiffusDir0*= max(0, dot(nNormalInW, -GbxP_LightDirDirInWorld0.xyz));
float3 LDiffus = LDiffusAmb + LDiffusDir0;
float OpacityDbg = Opacity;
if (MDbg_IsEnabled)
{ // Make the primitive fully opaque when debuggin layers:
Opacity = 1;
}
PS_OUTPUT Output;
Output.Color.rgb = mDiffuse * LDiffus;
Output.Color.rgb*= Opacity;
Output.Color.a = Opacity;
// Output.Color = Output.Color*1e-7 + float4(Stem0.aaa,1);
// Output.Color = Output.Color*1e-7 + float4(Stem1.aaa,1);
MDbg_Opacity( OpacityDbg);
MDbg_MapDiffuse( mDiffuse);
MDbg_LightDiffuse( HdrToneMap(LDiffus));
MDbg_LightDiffuseAmb( HdrToneMap(LDiffusAmb));
MDbg_LightDiffuseDir0( HdrToneMap(LDiffusDir0));
return Output;
}
/* Was fixed function:
Layer 0
TexOp Replace (0)
TexInput EGxTexInput_Current (0)
TexArg EGxTexArg_Texture (0)
TexOutput EGxTexOutput_Current (0)
Layer 1
TexOp AddAlpha (19)
TexInput EGxTexInput_Current (0)
TexArg EGxTexArg_Texture (0)
TexOutput EGxTexOutput_Current (0)
VertexColor
TexOp ReplaceRGB_ModulateAlpha (21)
TexInput EGxTexInput_Current (0)
TexArg EGxTexArg_VColor0 (1)
TexOutput EGxTexOutput_Current (0)
*/
MosKi.