8 textures for Atlas working
by Bobby Leighton · in Torque Game Engine Advanced · 01/01/2008 (12:54 am) · 53 replies
I have this working finally, and if it wasn't for a couple of the latest resources I would have missed what was keeping me held back(just what is probably a simple C++ matter for anyone other than me ATM), i just need to clean up the code, and get the source separated and packed together with a decent terrain example and some more screen shots. But here are a couple to see what Ive done so far....You can't see all 8 textures in this but you can see 6, with a 7th blended over the rock texture to take down the tiled look if you look close. This used 2 RBGA blend maps for the 8 textures:) If anyone likes this ones done I can put as many as 16 I think, and I'm pretty sure this will only be PS 3.0 only but I might be able to get the 8 working in 2.0 but no promises:)

These are both from the same terrain of coarse no tricks:) Ill have an example for the release that shows the textures side by side and all 8 of them of coarse.


These are both from the same terrain of coarse no tricks:) Ill have an example for the release that shows the textures side by side and all 8 of them of coarse.

#42
01/30/2008 (11:12 am)
Well i would keep them separate, that's the way i thought out the function that does the blending;)
#43
01/30/2008 (11:16 am)
No, sorry you seem to be missing the question :) Do both PNGs together come to a total of 255?
#44
01/30/2008 (1:21 pm)
Oh...i don't think so, it should be based off of 255 for each channel...like R=255 B=255...etc:) is that what you wanted...lol sorry
#45
For TGEA 1.7.0, I have made a little step-by-step description of what needs to be changed by checking Bobby's code with the 1.0.3 code and applying it to the 1.7.0 code.
This is still incomplete, I'm just trying to pass through what I managed to do so far - in case someone wants to help with this - I'd very much appreciate it, I'm too new to Torque still.
If you follow this, you don't need the files, I have included all the changes here. You need to modify 3 files and recompile the engine.
Be advised, that this still needs a shader problem solved - mentioned at the end of this post - and all you would get is a black terrain, so it's not yet fully functional.
Ok, these are the changes I did:
atlas/runtime/atlasClipMapBatcher.cpp:
1. add the following includes to the file, if you don't already have them:
2. In AtlasClipMapBatcher::renderClipMap() change:
to this:
3. Comment out the following lines in the same function:
4. In AtlasClipMapBatcher::render() comment out the following lines:
Bobby makes a remark, that it might work with the detail texture, but might need shader changes. I haven't checked yet either. For now, let's just try to make this work as he originally intended. :)
05/26/2008 (12:50 pm)
Hey guys.. first of all, this is gonna be a bit long, sorry about that...For TGEA 1.7.0, I have made a little step-by-step description of what needs to be changed by checking Bobby's code with the 1.0.3 code and applying it to the 1.7.0 code.
This is still incomplete, I'm just trying to pass through what I managed to do so far - in case someone wants to help with this - I'd very much appreciate it, I'm too new to Torque still.
If you follow this, you don't need the files, I have included all the changes here. You need to modify 3 files and recompile the engine.
Be advised, that this still needs a shader problem solved - mentioned at the end of this post - and all you would get is a black terrain, so it's not yet fully functional.
Ok, these are the changes I did:
atlas/runtime/atlasClipMapBatcher.cpp:
1. add the following includes to the file, if you don't already have them:
#include "materials/material.h" #include "lightingSystem/synapseGaming/sgLighting.h" #include "lightingSystem/synapseGaming/sgLightingModel.h" #include "materials/matInstance.h"
2. In AtlasClipMapBatcher::renderClipMap() change:
for(S32 i=0; i<4; i++)
{
GFX->setTextureStageAddressModeU(i, GFXAddressWrap);
GFX->setTextureStageAddressModeV(i, GFXAddressWrap);
GFX->setTextureStageMagFilter( i, GFXTextureFilterLinear);
GFX->setTextureStageMipFilter( i, GFXTextureFilterLinear);
GFX->setTextureStageMinFilter( i, GFXTextureFilterLinear);
GFX->setTextureStageColorOp( i, GFXTOPModulate);
}to this:
//added for atlas Texturing
GFX->setTexture(4, ((AtlasInstance*)mObject)->mOpacityTex);
GFX->setTexture(5, ((AtlasInstance*)mObject)->mOpacity2Tex);
GFX->setTexture(6, ((AtlasInstance*)mObject)->mAtlasTex[0]);
GFX->setTexture(7, ((AtlasInstance*)mObject)->mAtlasTex[1]);
GFX->setTexture(8, ((AtlasInstance*)mObject)->mAtlasTex[2]);
GFX->setTexture(9, ((AtlasInstance*)mObject)->mAtlasTex[3]);
GFX->setTexture(10, ((AtlasInstance*)mObject)->mLMTex);
//changed for atlas Texturing... 10 tex's -RML
for(S32 i=0; i<10; i++)
{
GFX->setTextureStageAddressModeU(i, GFXAddressWrap);
GFX->setTextureStageAddressModeV(i, GFXAddressWrap);
GFX->setTextureStageMagFilter( i, GFXTextureFilterLinear);
GFX->setTextureStageMipFilter( i, GFXTextureFilterLinear);
GFX->setTextureStageMinFilter( i, GFXTextureFilterLinear);
GFX->setTextureStageColorOp( i, GFXTOPModulate);
}
//added for atlas texturing
for(S32 i=0; i<4; i++)
{
GFX->setTexture(i, ((AtlasInstance*)mObject)->mTex[i]);
}3. Comment out the following lines in the same function:
if(smRenderDebugTextures)
GFX->setTexture(shaderIdx, cse.mDebugTex);
else
GFX->setTexture(shaderIdx, cse.mTex);4. In AtlasClipMapBatcher::render() comment out the following lines:
if( isDetailMappingEnabled() ) renderDetail();
Bobby makes a remark, that it might work with the detail texture, but might need shader changes. I haven't checked yet either. For now, let's just try to make this work as he originally intended. :)
#46
1. Add the following include:
2. In AtlasInstance::initPersistFields() change the following lines:
to these:
3. In AtlasInstance::AtlasInstance() find the following line
and replace with these:
4. Change the following in AtlasInstance::onAdd() from
to this:
05/26/2008 (12:51 pm)
Atlas/runtime/atlasInstance2.cpp:1. Add the following include:
#include "lightingSystem/synapseGaming/sgLightingModel.h"
2. In AtlasInstance::initPersistFields() change the following lines:
addField("detailTex", TypeFilename, Offset(mDetailTexFileName, AtlasInstance));
addField("atlasFile", TypeFilename, Offset(mAtlasFileName, AtlasInstance));
addField("lightmapDimension", TypeS32, Offset(mLightmapDimension, AtlasInstance));to these:
addField("detailTex", TypeFilename, Offset(mDetailTexFileName, AtlasInstance));
addField("atlasFile", TypeFilename, Offset(mAtlasFileName, AtlasInstance));
addField("lightmapDimension", TypeS32, Offset(mLightmapDimension, AtlasInstance));
//added for blendtextured terrian
addField("blendtex1", TypeFilename, Offset(mTex1FileName, AtlasInstance));
addField("blendtex2", TypeFilename, Offset(mTex2FileName, AtlasInstance));
addField("blendtex3", TypeFilename, Offset(mTex3FileName, AtlasInstance));
addField("blendtex4", TypeFilename, Offset(mTex4FileName, AtlasInstance));
addField("blendtex5", TypeFilename, Offset(mAtlas1TexFileName, AtlasInstance));
addField("blendtex6", TypeFilename, Offset(mAtlas2TexFileName, AtlasInstance));
addField("blendtex7", TypeFilename, Offset(mAtlas3TexFileName, AtlasInstance));
addField("blendtex8", TypeFilename, Offset(mAtlas4TexFileName, AtlasInstance));
//specular
addField("specular1", TypeColorF, Offset(mSpecular1, AtlasInstance));
addField("specular2", TypeColorF, Offset(mSpecular2, AtlasInstance));
addField("specular3", TypeColorF, Offset(mSpecular3, AtlasInstance));
addField("specular4", TypeColorF, Offset(mSpecular4, AtlasInstance));
//opacity
addField("opacityFile", TypeFilename, Offset(mOpacityTexFileName, AtlasInstance));
addField("opacity2File", TypeFilename, Offset(mOpacity2TexFileName, AtlasInstance));
addField("lmFile", TypeFilename, Offset(mLMTexFileName, AtlasInstance));3. In AtlasInstance::AtlasInstance() find the following line
mDetailTexFileName = NULL;
mAtlasFileName = StringTable->insert("terrain_water_demo/clean.atlas");and replace with these:
mDetailTexFileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mAtlasFileName = StringTable->insert("terrain_water_demo/clean.atlas");
//added for blendtextured terrian
mAtlas1TexFileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mAtlas2TexFileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mAtlas3TexFileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mAtlas4TexFileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mTex1FileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mTex2FileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mTex3FileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mTex4FileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
//opacity
mOpacityTexFileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mOpacity2TexFileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");
mLMTexFileName = StringTable->insert("terrain_water_demo/data/terrains/details/detail1");4. Change the following in AtlasInstance::onAdd() from
if( mDetailTexFileName )
{
if( !mDetailTex.set( mDetailTexFileName, &GFXDefaultStaticDiffuseProfile ) )
{
Con::warnf( "AtlasInstance2::onAdd - could not load detail map; disabling detail mapping" );
mBatcher.isDetailMappingEnabled( false );
}
}
else
mBatcher.isDetailMappingEnabled( false );to this:
/*if( mDetailTexFileName )
{
if( !mDetailTex.set( mDetailTexFileName, &GFXDefaultStaticDiffuseProfile ) )
{
Con::warnf( "AtlasInstance::onAdd - could not load detail map; disabling detail mapping" );
mBatcher.isDetailMappingEnabled( false );
}
}
else
mBatcher.isDetailMappingEnabled( false );*/
mDetailTex.set(mDetailTexFileName,&GFXDefaultStaticDiffuseProfile);
//added for blendmapped terrain
mAtlasTex[0].set(mAtlas1TexFileName,&GFXDefaultStaticDiffuseProfile);
mAtlasTex[1].set(mAtlas2TexFileName,&GFXDefaultStaticDiffuseProfile);
mAtlasTex[2].set(mAtlas3TexFileName,&GFXDefaultStaticDiffuseProfile);
mAtlasTex[3].set(mAtlas4TexFileName,&GFXDefaultStaticDiffuseProfile);
mTex[0].set(mTex1FileName,&GFXDefaultStaticDiffuseProfile);
mTex[1].set(mTex2FileName,&GFXDefaultStaticDiffuseProfile);
mTex[2].set(mTex3FileName,&GFXDefaultStaticDiffuseProfile);
mTex[3].set(mTex4FileName,&GFXDefaultStaticDiffuseProfile);
//opacity
mOpacityTex.set(mOpacityTexFileName,&GFXDefaultStaticDiffuseProfile);
mOpacity2Tex.set(mOpacity2TexFileName,&GFXDefaultStaticDiffuseProfile);
mLMTex.set(mLMTexFileName,&GFXDefaultStaticDiffuseProfile);
#47
and after these, insert the following:
6. In AtlasInstance::unpackUpdate find these:
and add the following after the previous lines:
atlas/runtime/atlasInstance2.h:
1. Within class AtlasInstance : public SceneObject find the following:
and after these, add:
2. Similarly in the same declaration, find
and append
3. Find
and after these, add the following declarations:
That was the easier part, since after this I kept getting weird error messages, and spent long hours debigging, and finally came to the following conclusions:
- The setTextures in atlasClipMapBatcher will not work right away, since the number of available texture samplers is set to 8. This is not correct, it only true for the fixed function pipeline. So in gfx/D3D9/pc/gfxPCD3D9Device.cpp find the code
and instead, assign a fixed value of 16. That is the real value for shader versions above 1.4. It would look better to check for the version or even create a table. Especially because DX10 and version 4.0 shaders will be able to handle more. But for now, I just set mNumSamplers to a fixed 16:
That takes care of the potential "GFXDevice::setTexture - out of range stage!" errors you might get without this.
- It might be a good idea to search for "clean up" in atlasClipMapBatcher.cpp and do a clean up for all the new textures as well (increase 4 to 11 in all 3 loops)
- increase the TORQUE_FRAME_SIZE in torqueConfig.h until you don't get any "Error alloc too large, increase frame size!" error messages. This could also be caused by a large visibleDistance value in the mission's sky object, so you might want to poke that too.
05/26/2008 (12:52 pm)
5. In AtlasInstance::packUpdate find these lines:stream->writeString(mDetailTexFileName); stream->writeString(mAtlasFileName);
and after these, insert the following:
//added for blendmapped terrain stream->writeString(mTex1FileName); stream->writeString(mTex2FileName); stream->writeString(mTex3FileName); stream->writeString(mTex4FileName); stream->writeString(mAtlas1TexFileName); stream->writeString(mAtlas2TexFileName); stream->writeString(mAtlas3TexFileName); stream->writeString(mAtlas4TexFileName); //opacity stream->writeString(mOpacityTexFileName ); stream->writeString(mOpacity2TexFileName ); stream->writeString(mLMTexFileName); //not sure how neccessary this really is stream->write(mSpecular1.red); stream->write(mSpecular1.green); stream->write(mSpecular1.blue); stream->write(mSpecular1.alpha); stream->write(mSpecular2.red); stream->write(mSpecular2.green); stream->write(mSpecular2.blue); stream->write(mSpecular2.alpha); stream->write(mSpecular3.red); stream->write(mSpecular3.green); stream->write(mSpecular3.blue); stream->write(mSpecular3.alpha); stream->write(mSpecular4.red); stream->write(mSpecular4.green); stream->write(mSpecular4.blue); stream->write(mSpecular4.alpha);
6. In AtlasInstance::unpackUpdate find these:
mDetailTexFileName = stream->readSTString(); mAtlasFileName = stream->readSTString();
and add the following after the previous lines:
//added for textured terrain mTex1FileName = stream->readSTString(); mTex2FileName = stream->readSTString(); mTex3FileName = stream->readSTString(); mTex4FileName = stream->readSTString(); mAtlas1TexFileName = stream->readSTString(); mAtlas2TexFileName = stream->readSTString(); mAtlas3TexFileName = stream->readSTString(); mAtlas4TexFileName = stream->readSTString(); //opacity mOpacityTexFileName = stream->readSTString(); mOpacity2TexFileName = stream->readSTString(); //lightmap stuff mLMTexFileName = stream->readSTString(); stream->read(&mSpecular1.red); stream->read(&mSpecular1.green); stream->read(&mSpecular1.blue); stream->read(&mSpecular1.alpha); stream->read(&mSpecular2.red); stream->read(&mSpecular2.green); stream->read(&mSpecular2.blue); stream->read(&mSpecular2.alpha); stream->read(&mSpecular3.red); stream->read(&mSpecular3.green); stream->read(&mSpecular3.blue); stream->read(&mSpecular3.alpha); stream->read(&mSpecular4.red); stream->read(&mSpecular4.green); stream->read(&mSpecular4.blue); stream->read(&mSpecular4.alpha);
atlas/runtime/atlasInstance2.h:
1. Within class AtlasInstance : public SceneObject find the following:
Resource<AtlasFile> mLightMapFile; GFXTexHandle mDetailTex;
and after these, add:
//added for texturing on atlas //bump tex GFXTexHandle mAtlasTex[4]; //terrian textures GFXTexHandle mTex[4]; //lightmap GFXTexHandle mLMTex; //opacity GFXTexHandle mOpacityTex; GFXTexHandle mOpacity2Tex;
2. Similarly in the same declaration, find
StringTableEntry mDetailTexFileName; StringTableEntry mAtlasFileName;
and append
//added for texturing terrian StringTableEntry mTex1FileName; StringTableEntry mTex2FileName; StringTableEntry mTex3FileName; StringTableEntry mTex4FileName; StringTableEntry mAtlas1TexFileName; StringTableEntry mAtlas2TexFileName; StringTableEntry mAtlas3TexFileName; StringTableEntry mAtlas4TexFileName; StringTableEntry mOpacityTexFileName; StringTableEntry mOpacity2TexFileName; StringTableEntry mLMTexFileName; //StringTableEntry mNMTexFileName;
3. Find
bool mIsBlended; ClipMapBlenderCache* mAcmic_b; AtlasResourceTexTOC* mOpacityToc; U32 mLightmapDimension; S32 mLMChunkSize;
and after these, add the following declarations:
ColorF mSpecular1; ColorF mSpecular2; ColorF mSpecular3; ColorF mSpecular4;
That was the easier part, since after this I kept getting weird error messages, and spent long hours debigging, and finally came to the following conclusions:
- The setTextures in atlasClipMapBatcher will not work right away, since the number of available texture samplers is set to 8. This is not correct, it only true for the fixed function pipeline. So in gfx/D3D9/pc/gfxPCD3D9Device.cpp find the code
mNumSamplers = caps.MaxSimultaneousTextures;
and instead, assign a fixed value of 16. That is the real value for shader versions above 1.4. It would look better to check for the version or even create a table. Especially because DX10 and version 4.0 shaders will be able to handle more. But for now, I just set mNumSamplers to a fixed 16:
// mNumSamplers = caps.MaxSimultaneousTextures; mNumSamplers = 16;
That takes care of the potential "GFXDevice::setTexture - out of range stage!" errors you might get without this.
- It might be a good idea to search for "clean up" in atlasClipMapBatcher.cpp and do a clean up for all the new textures as well (increase 4 to 11 in all 3 loops)
- increase the TORQUE_FRAME_SIZE in torqueConfig.h until you don't get any "Error alloc too large, increase frame size!" error messages. This could also be caused by a large visibleDistance value in the mission's sky object, so you might want to poke that too.
#48
In AtlasInstance::renderObject you find the following:
and after that code, you are supposed to insert this:
But this does not work under 1.7.0 anymore. If anyone could help with that, I think that would be the last bit for the 1.7.0 port. For now I have commented this out.
- Right now, I came to a stage, where everything runs smoothly, except none of the textures display.
Any further help would be much appreciated!
Konrad
05/26/2008 (12:52 pm)
- I am not very familiar with how shaders work (yet), and tgea has consideribly changed compared to 1.0.3. I am having trouble with the following in atlasInstance2.cpp:In AtlasInstance::renderObject you find the following:
objTrans.affineInverse(); objTrans.mulP( eyePos ); GFX->setVertexShaderConstF( VC_EYE_POS, (float*)&eyePos, 1 );
and after that code, you are supposed to insert this:
LightManager *lm = gClientSceneGraph->getLightManager(); LightInfo *light = lm->sgGetSpecialLight(LightManager::sgSunLightType); // fill in primary light //------------------------- Point3F lightPos = light->mPos; Point3F lightDir = light->mDirection; objTrans.mulP(lightPos); objTrans.mulV(lightDir); lightDir.normalizeSafe(); //light information for the shader Point4F lightPosModel(lightPos.x, lightPos.y, lightPos.z, light->sgTempModelInfo[0]); GFX->setVertexShaderConstF(VC_LIGHT_POS1, (float*)&lightPosModel, 1); GFX->setVertexShaderConstF(VC_LIGHT_DIR1, (float*)&lightDir, 1); GFX->setVertexShaderConstF(VC_LIGHT_DIFFUSE1, (float*)&light->mColor, 1); GFX->setPixelShaderConstF(PC_AMBIENT_COLOR, (float*)&light->mAmbient, 1); //specular information for the shader GFX->setPixelShaderConstF( PC_MAT_SPECCOLOR, ColorF(light->mColor.red,light->mColor.green,light->mColor.blue,0.5),1);//(float*)&light->mColor, 1 ); GFX->setPixelShaderConstF( PC_DIFF_COLOR2, ColorF(mSpecular1.red,mSpecular1.green,mSpecular1.blue,mSpecular1.alpha),1);//(float*)&light->mColor, 1 ); GFX->setPixelShaderConstF( PC_USERDEF1, ColorF(mSpecular2.red,mSpecular2.green,mSpecular2.blue,mSpecular2.alpha),1);//(float*)&light->mColor, 1 ); GFX->setPixelShaderConstF( PC_USERDEF2, ColorF(mSpecular3.red,mSpecular3.green,mSpecular3.blue,mSpecular3.alpha),1);//(float*)&light->mColor, 1 ); GFX->setPixelShaderConstF( PC_USERDEF3, ColorF(mSpecular4.red,mSpecular4.green,mSpecular4.blue,mSpecular4.alpha),1);//(float*)&light->mColor, 1 ); const float specpower = 64.0F; GFX->setPixelShaderConstF( PC_MAT_SPECPOWER, (float*)&specpower, 1 );
But this does not work under 1.7.0 anymore. If anyone could help with that, I think that would be the last bit for the 1.7.0 port. For now I have commented this out.
- Right now, I came to a stage, where everything runs smoothly, except none of the textures display.
Any further help would be much appreciated!
Konrad
#49
05/26/2008 (2:34 pm)
Great job... Ill get going on the shader, and by the way I thought you should know that the specular isnt needed because it was left over from Ves's Bump mapping resource seeing how i built mine on his...anyway well just keep it in the seeing how i planned on adding a specular layer in the shader to simulate the way WOW does theirs. So i ll start working on this tonight, I had got about this far but i had thrown out Ves's Speculars, now that it is all ported properly, and well I might add(Good Job!) it in. You'll all hear from me soon as I might need some help with it (The Shader):) As far as the last part goes, that you said was giving you trouble, I am having a problem there as well, there has been drastic changes to the way the clipmap is handled, So there I will need some real help but well cross that when we come to it:)
#50
Also, other than the complete black terrain issue, I have noticed that the movement in legacy terrain missions becomes jerky. I am not sure yet what might be causing this, but once all missions display ok, I will get to the bottom of it.
I'm not good with shaders at all, but I'm not giving up easily, so if you need any help, let me know! This would be a great addition to the 1.7.0 version, so I'm very eager to help however I can.
05/27/2008 (12:43 am)
Thanks Bobby! Since my last posts, I tried to make it so that if only the old 4 textures are defined, then the system reverts to how it used to work. This way it stays compatible with the regular missions as well. Although it still needs some work. How could this be done with the shaders? What would be the best approach to be able to choose one atlas.h over another based on whether 4 or 8 layers are defined?Also, other than the complete black terrain issue, I have noticed that the movement in legacy terrain missions becomes jerky. I am not sure yet what might be causing this, but once all missions display ok, I will get to the bottom of it.
I'm not good with shaders at all, but I'm not giving up easily, so if you need any help, let me know! This would be a great addition to the 1.7.0 version, so I'm very eager to help however I can.
#51
05/27/2008 (1:12 am)
What i would like to do is to set it up so there are separate shaders, and move this out of Atlas.h altogether, and then you could just define which shader to use in the atlas file similar to how materials are handles. Also i need to figure out how to create GUI controls for shader variables, that way its easy to control tiling. Im just not sure about this new clip-map, I am just a new coder to C++ and still have tons to learn, so please any suggestions... or errors you see me make, know that i wont be offended by any constructive criticism from anyone wanting to lend a hand. im hoping tomorrow night i can post...something:)
#52
I have managed to separate the old any terrain / new 8 blended terrain code, so depending on texture declarations the 8 blended fires or not.. I just need to beautify the code a bit, but it will help in staying compatible.
I am already working on rotating terrain textures, a fix for blended textures so they don't melt on steep hills, though I have a hard time testing it. .(meaning I can's see @%#!)
So I figured out I'd ask you how you were progressing and offer my help if there's anything in which I can be of use. I want to build that rotating resource on your 8 blended solution, they'd let us make awesome looking blended terrains!
06/04/2008 (10:09 am)
Hi Bobby. Any news on separating shaders & finding the root of the black terrain issue?I have managed to separate the old any terrain / new 8 blended terrain code, so depending on texture declarations the 8 blended fires or not.. I just need to beautify the code a bit, but it will help in staying compatible.
I am already working on rotating terrain textures, a fix for blended textures so they don't melt on steep hills, though I have a hard time testing it. .(meaning I can's see @%#!)
So I figured out I'd ask you how you were progressing and offer my help if there's anything in which I can be of use. I want to build that rotating resource on your 8 blended solution, they'd let us make awesome looking blended terrains!
#53
You think there is an easer way to specify a shader for the terrain, i could do everything we nedd in 2 HLSL files, I have been told recently there are a lot of ways to do this, but evertime i think I got it torque confuses me...please suggestions...Email me if you would I will and Ill talk tommorow,,,late right now for me:)
06/04/2008 (10:28 pm)
Its that darm clipmap, i have no idea anymore how the data from Atlas is being passed to the shaders, it seemed so obviuos before...We really should remove all of the code for the specular...I think this is probably redundant to a point as there is other specular code elsewhere that we could either tap into, or i could do this in a shader a different way, i would like to just be able to materilize it all so this is controlled and done the way other shaders are for torque. You think there is an easer way to specify a shader for the terrain, i could do everything we nedd in 2 HLSL files, I have been told recently there are a lot of ways to do this, but evertime i think I got it torque confuses me...please suggestions...Email me if you would I will and Ill talk tommorow,,,late right now for me:)
Torque Owner PuG
(e.g. if you could put all 8 layers into one image, would it total to 255?)
Regards.