I downloaded them also, where do I place the extracted files ?
I just created a folder called DXTemp and extracted them there. I then went into DXTemp and ran DXSetup.exe.
I downloaded them also, where do I place the extracted files ?
How do you mean? It's a standard particle stream, nothing special about it.does it use a mesh ?
As I wrote, it's a standard particle stream. There's absolutely nothing special about it. It's just that D3D9Client doesn't seem to recognize the DIFFUSE setting. It seems to be locked in to EMISSIVE. I tried the same scenario in the inline D3D7 (orbiter.exe) and it properly recognizes the DIFFUSE setting.Or is it it a sprite or something in the code ?
// RCS exhaust
RCS_Exhaust_tex = oapiRegisterExhaustTexture ("SSU\\Exhaust_atrcs");
SURFHANDLE RCS_tex = oapiRegisterParticleTexture("SSU\\ps-rcs2");
RCS_PSSpec.srcsize=0.1;
RCS_PSSpec.srcrate=800;
RCS_PSSpec.v0=60;//100
RCS_PSSpec.srcspread=0;
RCS_PSSpec.lifetime=0.2;
RCS_PSSpec.growthrate=20;
RCS_PSSpec.atmslowdown=5;
RCS_PSSpec.ltype=PARTICLESTREAMSPEC::DIFFUSE;
RCS_PSSpec.levelmap=PARTICLESTREAMSPEC::LVL_FLAT;
RCS_PSSpec.lmin=1;
RCS_PSSpec.atmsmap=PARTICLESTREAMSPEC::ATM_FLAT;
RCS_PSSpec.amin=1;
RCS_PSSpec.tex=RCS_tex;
// ==============================================================
// Part of the ORBITER VISUALISATION PROJECT (OVP)
// Dual licensed under GPL v3 and LGPL v3
// Copyright (C) 2012 - 2014 Jarmo Nikkanen
// ==============================================================
struct EPVERTEX {
float3 posL : POSITION0;
float2 tex0 : TEXCOORD0;
};
struct ParticleVS
{
float4 posH : POSITION0;
float2 tex0 : TEXCOORD0;
float light : TEXCOORD1;
};
ParticleVS ParticleDiffuseVS(NTVERTEX vrt)
{
ParticleVS outVS = (ParticleVS)0;
outVS.tex0 = vrt.tex0;
outVS.light = saturate(dot(-gSun.direction, vrt.nrmL)) + 0.6f;
outVS.posH = mul(float4(vrt.posL, 1.0f), gVP);
return outVS;
}
ParticleVS ParticleEmissiveVS(EPVERTEX vrt)
{
ParticleVS outVS = (ParticleVS)0;
outVS.tex0 = vrt.tex0;
outVS.posH = mul(float4(vrt.posL, 1.0f), gVP);
return outVS;
}
// ---------------------------------------------------------------------------------------------
// gMix is the particle opacity computed from time and halflife
// gColor is hardcoded to [1,1,1] in exhaust streams and [1, 0.7, 0.5] in reentry streams
// frg.light is a sun light intensity level illuminating a particles. Light color is [1,1,1]
// ---------------------------------------------------------------------------------------------
float4 ParticleDiffusePS(ParticleVS frg) : COLOR
{
float4 color = tex2D(WrapS, frg.tex0);
return float4(color.rgb*frg.light, color.a*gMix);
}
float4 ParticleEmissivePS(ParticleVS frg) : COLOR
{
float4 color = tex2D(WrapS, frg.tex0);
return float4(color.rgb*gColor.rgb, color.a*gMix);
}
float4 ParticleShadowPS(ParticleVS frg) : COLOR
{
float4 color = tex2D(WrapS, frg.tex0);
return float4(0,0,0,color.a*gMix);
}
technique ParticleDiffuseTech
{
pass P0
{
vertexShader = compile VS_MOD ParticleDiffuseVS();
pixelShader = compile PS_MOD ParticleDiffusePS();
AlphaBlendEnable = true;
BlendOp = Add;
ZEnable = true;
SrcBlend = SrcAlpha;
DestBlend = InvSrcAlpha;
ZWriteEnable = false;
}
}
technique ParticleEmissiveTech
{
pass P0
{
vertexShader = compile VS_MOD ParticleEmissiveVS();
pixelShader = compile PS_MOD ParticleEmissivePS();
AlphaBlendEnable = true;
BlendOp = Add;
ZEnable = true;
SrcBlend = SrcAlpha;
DestBlend = InvSrcAlpha;
ZWriteEnable = false;
}
// ---------------------------------------------------------------------------------------------
// Ground shadows are rendered only for DIFFUSE particles
// Shadow rendering is defined here because of identical vertex declarations [EPVERTEX]
// ---------------------------------------------------------------------------------------------
pass P1
{
vertexShader = compile VS_MOD ParticleEmissiveVS();
pixelShader = compile PS_MOD ParticleShadowPS();
AlphaBlendEnable = true;
BlendOp = Add;
ZEnable = true;
SrcBlend = SrcAlpha;
DestBlend = InvSrcAlpha;
ZWriteEnable = false;
}
}
float4 ParticleDiffusePS(ParticleVS frg) : COLOR
{
return float4(1,0,0,1); //Red particles
}
float4 ParticleEmissivePS(ParticleVS frg) : COLOR
{
return float4(0,1,0,1); //Green particles
}
Well, emissive should behave like a mesh with a emissive material, IE glow. Diffuse should be the the opposite, shaded and affected by shadows.What exactly should be the difference between emissive and diffuse particles ?
#ifdef OAPI_BETA
if (pBltGrpTgt) {
if (CheckBltGroup(src,tgt)) SURFACE(pBltGrpTgt)->AddQueue(SURFACE(src), &rs, &rt);
else SURFACE(tgt)->CopyRect(SURFACE(src), &rs, &rt, flag);
}
else SURFACE(tgt)->CopyRect(SURFACE(src), &rs, &rt, flag);
#else
SURFACE(tgt)->CopyRect(SURFACE(src), &rs, &rt, flag);
#endif
Here's a comparison. D3D7 inline on the left, D3D9Client R14 on the right. It's the diffuse that's the problem, it seems to be way too bright and glowing like the emissive setting.Which one doesn't work correctly compared to D3D7, Diffuse or Emissive ?
It is currently known that diffuse particles aren't effected by planet shadow in D3D9, could that be the source of the problem ?
Are the diffuse exhausts too bright ?
I think we should remove it. It's called the P1 branch, so it's clearly not for BETA
[...]
Should we simplify the code by removing the Beta related code sections from P1 branch or keep them ?
But when I start the Orbiter_NG, and activate the D3D9 client, they appear like this:
Here's a little dummy question about the TortoiseSVN. How can I compare a file from my working copy to some older revision ? Not the head revision.
BTW, what's the story behind Beta 1+2 and Beta 3 branches ?
What do you mean with that?2. Functions doesn't allow default parameters.
Any thoughts/suggestions ?
// default arguments:
int foo (int bar, int baz = 0);
// overloading:
int foo (int bar);
int foo (int bar, int baz);
Easy:
1. "Show log" context menu on file
2. "Compare with working copy" @ the revision you would like to
compare with.
Any problems with that?
T
Here is the function in question:
typedef void (__cdecl *_ogciSketchBltEx)(oapi::Sketchpad *pSkp, SURFHANDLE hSrc, LPRECT s, LPRECT t, float alpha = -1, VECTOR3 *color=NULL);
Produces an error related to default parameters.