Texture Splatting Effect Without Pixel Shader

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

hybrid wrote:
BlindSide wrote:
arras wrote: ONE_TEXTURE_BLEND blends only one texture not two. On top of already rendered pixels (background). You can archive more textures if you simply render same geometry with different textures and alpha. But that of course may be slow.
It blends two textures together, or did I get that wrong?
No, arras is right. It takes one texture and allows arbitrary blend modes for background blending.
Oh I had my hopes up this whole time :P I'll have to look into making some general purpose multi-texture blending materials...
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Re: Texture Splatting Effect Without Pixel Shader

Post by BlindSide »

sio2 wrote:
locosoftware wrote:First I got an idea with http://downloads.gamedev.net/features/h ... ngDemo.zip in Direct3D 9.
The pixel shader codepath in that demo uses a single draw call. The fixed-function path uses four. If your game is transform limited then the shader path is more optimal.
Oh, now I see why the shader version is more efficient. Though in practice, 3 less draw calls don't necessarily mean faster.

PS: I got an idea for simple hardware instancing. You just take a mesh, repeat it several times in the meshbuffer, then apply a hardware skinning shader, and transform each repetition of the mesh individually based on an index defined by vertex color etc. I'm thinking of applying this to bitplanes grass scene node or something.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
doqkhanh
Posts: 158
Joined: Sat Mar 01, 2008 3:14 am
Location: Tokyo, Japan
Contact:

Post by doqkhanh »

Oh no, how to apply this cool engine hack to Irrlicht's terrain? May be, I need to edit terrain scene node?
TheAddicted
Posts: 1
Joined: Sat Jul 12, 2008 10:31 am
Location: Barcelona, Spain.

Post by TheAddicted »

I was trying to apply this on irrlicht terrain some weeks ago, what I got was this:Image

Im able to set an alpha map to a texture but when rendering it only shows the last texture I've set to draw, u can try to draw sand texture the last one and it will b drawn but not grass texture.

I've used example 12.TerrainRendering with VC8 to try it so if u wanna try it just replace main.cpp from there and extract media content to media folder.

main.cpp
media.rar

This is my first irrlicht attempt, Help would b apreciated, thanks!
doqkhanh
Posts: 158
Joined: Sat Mar 01, 2008 3:14 am
Location: Tokyo, Japan
Contact:

Post by doqkhanh »

The same to you. It's seem your code will be fine, everything at right setting and postition, but why???

And, with new Irrlicht engine moded, all my old demo run ok :) Good hack!
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Guy!

Since most of this stuff I see is a mod to the engine, can you propose it as a patch on the DEV site? Perhaps it could be included in the next release. (Since this is all based on rendering)

I would really love to be able to "paint" textures on a mesh like ELVMAN demontrated (HEX Editor). This could also be used for level creation for creating damaged concrete on buildings.
Post Reply