Jump to content

Recommended Posts

Posted

Did anyone try to implement blending a custom texture onto the terrain? We have tried the following:

 

SetTerrainTexture(game.scene.terrain, fowTerrainTexture, 0, 2);
BlendTerrainTexture(game.scene.terrain, 0, 0, 1.0f, 2);
SetTerrainTextureScale(game.scene.terrain, game.scene.terrainresolution* 2, 2);

 

Where fowTerrainTexture is a black and white texture which is intended to be used as fog of war texture. There is no mistake about the channle number and resolution of the texture, the problem is the transparent areas in the texture are displayed white. Can anyone give some tips about how to use BlendTerrainTexture function? We have tried to adjust the alpha parameter, also tried with different textures as well. We use C++ and gamelib 0.16 btw. Thanks...

Posted

Can you post a demo I can try myself? There are many things that can go wrong, so without your actual demo, I am just guessing at what you might be doing.

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...