Re: Texture Splatting [OpenGL]
Posted: Fri Oct 28, 2011 10:49 pm
Ohh, and its been a few days now since i commented. So ive lost interest anyways switching to ogre.
Official forum of the Irrlicht Engine
https://irrlicht.sourceforge.io/forum/
Do you really think my brain is a peanut or something?by hybrid » Sat Oct 29, 2011 11:14 am
Yeah, freat bug report you made there. And your previous post is - really incredible - 60 *seconds* old. Can't really imagine why no one answered you in between. So best of luck with your patience and skills for problem reporting at the next engine.
3 days later.. No answer concerning your post.Hey, guys can you help me fix this error? It says "....."
60 seconds laterThe error is still there even when i did "......"
You obviously cant see the connection between the posts. Maybe you have a social disorder or something, and if that is the case then i must excuse myself, but if not then you should start taking a better look at the posts before you bomb me with your invalid arguments for no reason.Ohh, and by the way.. I gave up.. Seems like it wasent the right thing for me "........"
Have you ever tried the new terrain system in ogre? You can input a 61441x61441 pixel height map, and still get a stable fps. (this does not mean that i hate Irrlicht, infact it is one of the best game engines ive ever tried.)by ACE247 » Sat Oct 29, 2011 1:40 pm
'Reason' yeah have fun with OGRE its so abstracted and messy... Well I wont say any more.
Ok, so this is your problem report. At first and second glance there's even no report from you. Only once we learn that you put your report inside the reply from freetimecoder we can get a slight idea about what you mean. Next post tells us that you have many RAM and an unknown gfx card, again with lots of RAM. Guess what might help us more to know instead of the amount of RAM you have...reason wrote:Only problem is:
Thank youby roelor » Tue Jun 08, 2010 12:05 am
this doesnt work well on my intel gma 4500. framerate is low, (thats to be expected) but the terrain is transparant in the distance. (you can look through the terrain).
by freetimecoder » Wed Jun 09, 2010 9:03 am
Hi,
Is it transparent only in the distance or everywhere? Only in the distance. Does it look like on the screenshot, ecxept the transparency? Looks like on the screenshots. What OpenGL/GLSL version do you have? OpenGL 2.1 Does it give any errors in the console? Dont think so.
greetings
This does not mean that i hate Irrlicht!!by reason » Fri Oct 28, 2011 11:49 pm
Ohh, and its been a few days now since i commented. So ive lost interest anyways switching to ogre.
You probably can, and wouldnt doubt it, but i cant and thats why im going to test Ogre, because its easier for ME. Maybe not for you.by ACE247 » Tue Nov 01, 2011 2:40 pm
WOAOW!! Problem report? Problematic report...
PS do you have any idea how that terrain works? Didn't think so. I can make the same thing in irrlicht thanks to the magic of guess what? Shaders and proper programming.
Code: Select all
using System.Runtime.InteropServices;
...(namespace main class)...
public partial class Main : Form
{
public const string DLLName = "DarkMap Dynamic Library.dll";
#region PInvoke
[DllImport(@DLLName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void InitEditor(IntPtr window);
[DllImport(@DLLName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void UpdateEditor();
[DllImport(@DLLName, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr GetGrid();
[DllImport(@DLLName, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr GetNodeFromMouse(int type);
[DllImport(@DLLName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void Deselect();
[DllImport(@DLLName, CallingConvention = CallingConvention.Cdecl)]
internal static extern void ResetEditor();
.....
Code: Select all
private void Main_KeyDown(object sender, KeyEventArgs e)
{
AltDown = e.Alt;
if (e.Alt)
Input.InputKeyDown(256);
else
Input.InputKeyUp(256);
if (e.Control)
Input.InputKeyDown(255);
else
Input.InputKeyUp(255);
Input.InputKeyDown(e.KeyValue);
}
Code: Select all
terrain->setMaterialFlag(video::EMF_LIGHTING,false);
Additionally, I always get black edges when using the alpha channel:freetimecoder wrote:Code: Select all
material.MaterialTypeParam =pack_texureBlendFunc(video::EBF_DST_COLOR,video::EBF_ONE);
Code: Select all
driver->setMaterial(material);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
driver->drawMeshBuffer(((scene::ITerrainSceneNode*)array_Nodes[i].Node)->getRenderBuffer());
glDisable(GL_BLEND);
Code: Select all
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, material.MaterialTypeParam);
Code: Select all
//Create the shader material
shaderMaterial = driver->getGPUProgrammingServices()->addHighLevelShaderMaterial(
vertShader, "main", video::EVST_VS_1_1,
fragShader, "main", video::EPST_PS_1_1,
this, video::EMT_ONETEXTURE_BLEND);
Code: Select all
if(array_Nodes[i].Node->getType()==scene::ESNT_TERRAIN){
video::SMaterial material = array_Nodes[i].Node->getMaterial(0);
material.MaterialType = (video::E_MATERIAL_TYPE)shaderMaterial;
material.BlendOperation = video::EBO_ADD;
material.MaterialTypeParam = pack_textureBlendFunc(video::EBF_SRC_ALPHA ,video::EBF_ONE_MINUS_SRC_ALPHA);
driver->setMaterial(material);
driver->drawMeshBuffer(((scene::ITerrainSceneNode*)array_Nodes[i].Node)->getRenderBuffer());
}