realXtend / tundra

realXtend Tundra SDK, a 3D virtual world application platform.
www.realxtend.org
Apache License 2.0
84 stars 70 forks source link

Add support for real reflection mapping in SuperShader. #242

Open juj opened 13 years ago

juj commented 13 years ago

Historically the SuperShader was written to support only reflection mapping from a single 2D texture, instead of a cube map texture, since the OpenSim asset server only supported uploading 2D textures.

Now that we have none of those limitations, implement proper support for cube map reflections.

peterclemenko commented 12 years ago

This forum post seems relevant: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=63732

juj commented 12 years ago

Tundra already does implement normal mapping, reflection mapping and the combination of these two as the ogre3d article lists. This issue relates to old legacy limitation where textures had to be 2D textures in the OpenSim asset server, and you could not store 3D textures or cube maps.

jonnenauha commented 12 years ago

So do we need anything else than add parsing of cubic_texture here? https://github.com/realXtend/naali/blob/tundra2/src/Core/OgreRenderingModule/OgreMaterialAsset.cpp#L250

Texture assets should already support all FreeImage formats, at least on the download level. I think TextureAsset::DeserializeFrom needs to set the type of the manually created texture to something else than Ogre::TEX_TYPE_2D when its a cube texture? https://github.com/realXtend/naali/blob/tundra2/src/Core/OgreRenderingModule/TextureAsset.cpp#L151