Doom 3 engine release and game code
Re: Doom 3 engine release and game code
Thanks frag
guess ill have to change my nick to stoney now...
guess ill have to change my nick to stoney now...
Productivity is a state of mind.
-
- Posts: 2
- Joined: Sun Feb 21, 2010 12:29 am
Re: Doom 3 engine release and game code
Good luck with your surgery!
Time to change your diet? Or is this more of a genetic thing?
My uncle had gall stones for years, changed his diet and has been good ever since, I hope it's something simple like that for you. He used to complain about pains all the time.
Time to change your diet? Or is this more of a genetic thing?
My uncle had gall stones for years, changed his diet and has been good ever since, I hope it's something simple like that for you. He used to complain about pains all the time.
Re: Doom 3 engine release and game code
Gallstones seem to be genetic in my Family so ouch.
Im the first to get kidneystones though, might just be a fluke but damn how unfortunate can you get...
Im the first to get kidneystones though, might just be a fluke but damn how unfortunate can you get...
Productivity is a state of mind.
Re: Doom 3 engine release and game code
Surgery done, cant say i enjoy it atm compared to gallstone surgery this is hell... damn it hurts. Hope the end result is worth the pain.
Also bought 2x radeon R9 270X and yup doom3 will not run strangely enough prey will guess humanhead fixed the doom3 engine problem.
Also bought 2x radeon R9 270X and yup doom3 will not run strangely enough prey will guess humanhead fixed the doom3 engine problem.
Productivity is a state of mind.
Re: Doom 3 engine release and game code
Hope your pain doesn't last long, and hopefully you have some pills.
Radeon forever has issues but a new card won't play it??
Radeon forever has issues but a new card won't play it??
Re: Doom 3 engine release and game code
Tried an older atioglxx.dll? I've heard about this problem regarding Doom3 BFG Edition and even HD Radeons...reckless wrote:Also bought 2x radeon R9 270X and yup doom3 will not run strangely enough prey will
There's never been a video card with mature bug-free drivers at launch. There would be so much delay otherwise that the card would be DoA on release...qbism wrote:Hope your pain doesn't last long, and hopefully you have some pills.
Radeon forever has issues but a new card won't play it??
i should not be here
Re: Doom 3 engine release and game code
Havent really had time to yank around with the driver yet, but ill try when i feel a lil better .
New Card seems to = old Card when it comes to this problem unfortunatly
Btw the R9 270X is based on the pitcairn GPU so its actually not new they just crammed more ram and a lil higher clock speed into it.
Mines a TOXIC edition from Sapphire so has really good cooling compared to stock models, unfortunatly its also massive in size (larger than a 285 GTX ultra ).
New Card seems to = old Card when it comes to this problem unfortunatly
Btw the R9 270X is based on the pitcairn GPU so its actually not new they just crammed more ram and a lil higher clock speed into it.
Mines a TOXIC edition from Sapphire so has really good cooling compared to stock models, unfortunatly its also massive in size (larger than a 285 GTX ultra ).
Productivity is a state of mind.
Re: Doom 3 engine release and game code
Could it be glsl syntax? For example, Barnes wrote a shader fix for Q2xp for ATI, can see on sourceforge. My trusty Mobility died recently so memory of ATI tricks is fading. I keep getting burned by HP (literally, thanks to poor cooling) but reconditioned HP/radeon pavilions are so cheap I keep coming back.
Re: Doom 3 engine release and game code
Was the ol catalyst bug again rename Doom3.exe to something else and it works like a charm.
Wonder if they will ever fix that bug, its been haunting ATI since they changed the gui interface to NET.
Wonder if they will ever fix that bug, its been haunting ATI since they changed the gui interface to NET.
Productivity is a state of mind.
Re: Doom 3 engine release and game code
Btw radeonpro also fucks up doom3 (NET again sigh). If id know a bit more about gui coding i would change this crap to a QT interface and it cant go fast enough.
Productivity is a state of mind.
Re: Doom 3 engine release and game code
Code: Select all
void RB_CreateSingleDrawInteractions(const drawSurf_t *surf, void (*DrawInteraction)(const drawInteraction_t *))
{
const idMaterial *surfaceShader = surf->material;
const float *surfaceRegs = surf->shaderRegisters;
const viewLight_t *vLight = backEnd.vLight;
const idMaterial *lightShader = vLight->lightShader;
const float *lightRegs = vLight->shaderRegisters;
drawInteraction_t inter;
if (r_skipInteractions.GetBool() || !surf->geo || !surf->geo->ambientCache)
{
return;
}
// change the matrix and light projection vectors if needed
if (surf->space != backEnd.currentSpace)
{
backEnd.currentSpace = surf->space;
glLoadMatrixf(surf->space->modelViewMatrix);
}
// change the scissor if needed
if (r_useScissor.GetBool() && !backEnd.currentScissor.Equals(surf->scissorRect))
{
backEnd.currentScissor = surf->scissorRect;
glScissor(backEnd.viewDef->viewport.x1 + backEnd.currentScissor.x1,
backEnd.viewDef->viewport.y1 + backEnd.currentScissor.y1,
backEnd.currentScissor.x2 + 1 - backEnd.currentScissor.x1,
backEnd.currentScissor.y2 + 1 - backEnd.currentScissor.y1);
}
// hack depth range if needed
if (surf->space->weaponDepthHack)
{
RB_EnterWeaponDepthHack();
}
if (surf->space->modelDepthHack)
{
RB_EnterModelDepthHack(surf->space->modelDepthHack);
}
inter.surf = surf;
inter.lightFalloffImage = vLight->falloffImage;
R_GlobalPointToLocal(surf->space->modelMatrix, vLight->globalLightOrigin, inter.localLightOrigin.ToVec3());
R_GlobalPointToLocal(surf->space->modelMatrix, backEnd.viewDef->renderView.vieworg, inter.localViewOrigin.ToVec3());
inter.localLightOrigin[3] = 0;
inter.localViewOrigin[3] = 1;
inter.ambientLight = lightShader->IsAmbientLight();
// the base projections may be modified by texture matrix on light stages
idPlane lightProject[4];
for (int i = 0; i < 4; i++)
{
R_GlobalPlaneToLocal(surf->space->modelMatrix, backEnd.vLight->lightProject[i], lightProject[i]);
}
for (int lightStageNum = 0; lightStageNum < lightShader->GetNumStages(); lightStageNum++)
{
const shaderStage_t *lightStage = lightShader->GetStage(lightStageNum);
// ignore stages that fail the condition
if (!lightRegs[lightStage->conditionRegister])
{
continue;
}
inter.lightImage = lightStage->texture.image;
memcpy(inter.lightProjection, lightProject, sizeof(inter.lightProjection));
// now multiply the texgen by the light texture matrix
if (lightStage->texture.hasMatrix)
{
RB_GetShaderTextureMatrix(lightRegs, &lightStage->texture, backEnd.lightTextureMatrix);
RB_BakeTextureMatrixIntoTexgen(reinterpret_cast<class idPlane *>(inter.lightProjection), backEnd.lightTextureMatrix);
}
inter.bumpImage = NULL;
inter.specularImage = NULL;
inter.diffuseImage = NULL;
inter.diffuseColor[0] = inter.diffuseColor[1] = inter.diffuseColor[2] = inter.diffuseColor[3] = 0;
inter.specularColor[0] = inter.specularColor[1] = inter.specularColor[2] = inter.specularColor[3] = 0;
float lightColor[4];
lightColor[0] = backEnd.lightScale * lightRegs[lightStage->color.registers[0]];
lightColor[1] = backEnd.lightScale * lightRegs[lightStage->color.registers[1]];
lightColor[2] = backEnd.lightScale * lightRegs[lightStage->color.registers[2]];
lightColor[3] = lightRegs[lightStage->color.registers[3]];
// go through the individual stages
for (int surfaceStageNum = 0; surfaceStageNum < surfaceShader->GetNumStages(); surfaceStageNum++)
{
const shaderStage_t *surfaceStage = surfaceShader->GetStage(surfaceStageNum);
switch (surfaceStage->lighting)
{
case SL_AMBIENT:
{
// ignore ambient stages while drawing interactions
break;
}
case SL_BUMP:
{
// ignore stage that fails the condition
if (!surfaceRegs[surfaceStage->conditionRegister])
{
// fix for POM initialize the matrix even if no stage.
inter.bumpMatrix[0][0] = 1;
inter.bumpMatrix[0][1] = 0;
inter.bumpMatrix[0][2] = 0;
inter.bumpMatrix[0][3] = 0;
inter.bumpMatrix[1][0] = 0;
inter.bumpMatrix[1][1] = 1;
inter.bumpMatrix[1][2] = 0;
inter.bumpMatrix[1][3] = 0;
break;
}
// draw any previous interaction
RB_SubmitInteraction(&inter, DrawInteraction);
inter.diffuseImage = NULL;
inter.specularImage = NULL;
R_SetDrawInteraction(surfaceStage, surfaceRegs, &inter.bumpImage, inter.bumpMatrix, NULL);
break;
}
case SL_DIFFUSE:
{
// ignore stage that fails the condition
if (!surfaceRegs[surfaceStage->conditionRegister])
{
// fix for POM initialize the matrix even if no stage.
inter.diffuseMatrix[0][0] = 1;
inter.diffuseMatrix[0][1] = 0;
inter.diffuseMatrix[0][2] = 0;
inter.diffuseMatrix[0][3] = 0;
inter.diffuseMatrix[1][0] = 0;
inter.diffuseMatrix[1][1] = 1;
inter.diffuseMatrix[1][2] = 0;
inter.diffuseMatrix[1][3] = 0;
break;
}
if (inter.diffuseImage)
{
RB_SubmitInteraction(&inter, DrawInteraction);
}
R_SetDrawInteraction(surfaceStage, surfaceRegs, &inter.diffuseImage, inter.diffuseMatrix, inter.diffuseColor.ToFloatPtr());
inter.diffuseColor[0] *= lightColor[0];
inter.diffuseColor[1] *= lightColor[1];
inter.diffuseColor[2] *= lightColor[2];
inter.diffuseColor[3] *= lightColor[3];
inter.vertexColor = surfaceStage->vertexColor;
break;
}
case SL_SPECULAR:
{
// ignore stage that fails the condition
if (!surfaceRegs[surfaceStage->conditionRegister])
{
// fix for POM initialize the matrix even if no stage.
inter.specularMatrix[0][0] = 1;
inter.specularMatrix[0][1] = 0;
inter.specularMatrix[0][2] = 0;
inter.specularMatrix[0][3] = 0;
inter.specularMatrix[1][0] = 0;
inter.specularMatrix[1][1] = 1;
inter.specularMatrix[1][2] = 0;
inter.specularMatrix[1][3] = 0;
break;
}
if (inter.specularImage)
{
RB_SubmitInteraction(&inter, DrawInteraction);
}
R_SetDrawInteraction(surfaceStage, surfaceRegs, &inter.specularImage, inter.specularMatrix, inter.specularColor.ToFloatPtr());
inter.specularColor[0] *= lightColor[0];
inter.specularColor[1] *= lightColor[1];
inter.specularColor[2] *= lightColor[2];
inter.specularColor[3] *= lightColor[3];
inter.vertexColor = surfaceStage->vertexColor;
break;
}
}
}
// draw the final interaction
RB_SubmitInteraction(&inter, DrawInteraction);
}
// unhack depth range if needed
if (surf->space->weaponDepthHack || surf->space->modelDepthHack != 0.0f)
{
RB_LeaveDepthHack();
}
}
Productivity is a state of mind.
Re: Doom 3 engine release and game code
Man, reckless, didn't see this earlier... hope you get well soon.
Re: Doom 3 engine release and game code
Np gb surgery done and besides a rather unpleasant week im all ok again. Not looking forward to having the kateter removed though .
Moved the fix to the material parser and set the initial stage for the matrices before parsing.
Still a few things to iron out the fix does not work for DDS textures hmm ???
Moved the fix to the material parser and set the initial stage for the matrices before parsing.
Still a few things to iron out the fix does not work for DDS textures hmm ???
Productivity is a state of mind.
Re: Doom 3 engine release and game code
Ok Sikkpin helped getting the code working correctly heres the final version.
replace the old function with this and decals will look like they should again with parallax mapping
Does not however fix the sliding surfaces with parallax but sikkpins offset limited version looks really good now.
Code: Select all
static void RB_SubmitInteraction(drawInteraction_t *din, void (*DrawInteraction)(const drawInteraction_t *))
{
if (!din->bumpImage)
{
// if no bumpmap then we dont have diffuse or specular either.
// initialize the matrices to a default value.
din->diffuseMatrix[0][0] = 1;
din->diffuseMatrix[0][1] = 0;
din->diffuseMatrix[0][2] = 0;
din->diffuseMatrix[0][3] = 0;
din->diffuseMatrix[1][0] = 0;
din->diffuseMatrix[1][1] = 1;
din->diffuseMatrix[1][2] = 0;
din->diffuseMatrix[1][3] = 0;
din->specularMatrix[0][0] = 1;
din->specularMatrix[0][1] = 0;
din->specularMatrix[0][2] = 0;
din->specularMatrix[0][3] = 0;
din->specularMatrix[1][0] = 0;
din->specularMatrix[1][1] = 1;
din->specularMatrix[1][2] = 0;
din->specularMatrix[1][3] = 0;
din->bumpMatrix[0][0] = 1;
din->bumpMatrix[0][1] = 0;
din->bumpMatrix[0][2] = 0;
din->bumpMatrix[0][3] = 0;
din->bumpMatrix[1][0] = 0;
din->bumpMatrix[1][1] = 1;
din->bumpMatrix[1][2] = 0;
din->bumpMatrix[1][3] = 0;
return;
}
if (!din->diffuseImage || r_skipDiffuse.GetBool())
{
din->diffuseMatrix[0][0] = 1;
din->diffuseMatrix[0][1] = 0;
din->diffuseMatrix[0][2] = 0;
din->diffuseMatrix[0][3] = 0;
din->diffuseMatrix[1][0] = 0;
din->diffuseMatrix[1][1] = 1;
din->diffuseMatrix[1][2] = 0;
din->diffuseMatrix[1][3] = 0;
din->diffuseImage = globalImages->blackImage;
}
if (!din->specularImage || r_skipSpecular.GetBool() || din->ambientLight)
{
din->specularMatrix[0][0] = 1;
din->specularMatrix[0][1] = 0;
din->specularMatrix[0][2] = 0;
din->specularMatrix[0][3] = 0;
din->specularMatrix[1][0] = 0;
din->specularMatrix[1][1] = 1;
din->specularMatrix[1][2] = 0;
din->specularMatrix[1][3] = 0;
din->specularImage = globalImages->blackImage;
}
if (!din->bumpImage || r_skipBump.GetBool())
{
din->bumpMatrix[0][0] = 1;
din->bumpMatrix[0][1] = 0;
din->bumpMatrix[0][2] = 0;
din->bumpMatrix[0][3] = 0;
din->bumpMatrix[1][0] = 0;
din->bumpMatrix[1][1] = 1;
din->bumpMatrix[1][2] = 0;
din->bumpMatrix[1][3] = 0;
din->bumpImage = globalImages->flatNormalMap;
}
if (r_lightMap.GetBool())
{
din->diffuseImage = globalImages->whiteImage;
din->specularImage = globalImages->blackImage;
din->bumpImage = globalImages->flatNormalMap;
}
// if we wouldn't draw anything, don't call the Draw function
if (((din->diffuseColor[0] > 0 ||
din->diffuseColor[1] > 0 ||
din->diffuseColor[2] > 0) && din->diffuseImage != globalImages->blackImage) ||
((din->specularColor[0] > 0 ||
din->specularColor[1] > 0 ||
din->specularColor[2] > 0) && din->specularImage != globalImages->blackImage))
{
DrawInteraction(din);
}
}
Does not however fix the sliding surfaces with parallax but sikkpins offset limited version looks really good now.
Productivity is a state of mind.
Re: Doom 3 engine release and game code
Mini-bump
Got most of the BFG GLSL backend merged into standard Doom 3.
https://github.com/raynorpat/morpheus
It won't work on integrated Intel GPUs just yet, I think Intel's compatibility context is being ass, but should work once most of the deprecated calls go away and the compatibility context is migrated to a core OpenGL context.
Got most of the BFG GLSL backend merged into standard Doom 3.
https://github.com/raynorpat/morpheus
It won't work on integrated Intel GPUs just yet, I think Intel's compatibility context is being ass, but should work once most of the deprecated calls go away and the compatibility context is migrated to a core OpenGL context.