As was expected, here's a video showing the material system of "rebirth engine" built in Arx Fatalis. The material is very simple (just diffuse). The decor is managed as a static object with about 70 different materials. I applied on every texture a B-Spline pixel filtering" for each mipmap. In addition, I enabled the anisotropy for minification. The result is rather encouraging.
Here an example of the rebirth engine shader system:
#include "../public/declare_effect.h"
BEGIN_DECLARE_SHADER
BEGIN_SHADER( DX8_Flat, true )
DECLARE_SHADER_PARAM( DIFFUSE, "TEXTURE", "0" )
DECLARE_SHADER_PARAM( NORMAL, "TEXTURE", "1" )
END_SHADER( DX8_Flat )
STATIC_SHADER( DX8_Flat )
SHADER.Commit_RenderState( RS_FILLMODE, FILL_SOLID );
const std::string& sDiffuseValue = GET_SHADER_VALUE("DIFFUSE");
ITexture_* pTexture = ASSET_MANAGER.Get_TextureByName( sDiffuseValue );
if( pTexture )
{
SHADER.BindTexture( 0, *pTexture );
}
SHADER.Commit_TextureStageState( 0, TSS_COLOROP, TOP_SELECTARG1, 0 );
SHADER.Commit_TextureStageState( 0, TSS_COLORARG1, TA_TEXTURE, 0 );
SHADER.Commit_TextureStageState( 0, TSS_ALPHAOP, TOP_DISABLE, 0 );
DYNAMIC_SHADER( DX8_Flat )
END_DECLARE_SHADER
Here a new video:
Hi, your changes look interesting. Is there any source code available?
RépondreSupprimerI myself, along with a few others, have also been working on the opensourced Arx Fatalis code. Our project is at https://github.com/lubosz/ArxFatalis and you can usually find us in #arxfatalis on irc.freenode.net.