• Sign up for September Mapping Competition! The prize includes Otland Premium time.
  • There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[OTClient Showoff] Show off your OTClient project/module/UI and other

Oskar1121

Veteran OT User
Joined
Jul 15, 2009
Messages
572
Best answers
0
Reaction score
286
Location
Poland
Will you share with your shaders?

Code for shaders, at creature.cpp
C++:
internalDrawOutfit
C++:
    if (g_graphics.getPainterEngine() == g_graphics.Painter_OpenGL2)
    {
        if (m_shader && g_painter->hasShaders() && g_graphics.shouldUseShaders()) {
            m_shader->bind();
            m_shader->setUniformValue(ShaderManager::OUTFIT_ID_UNIFORM, 0);
            g_painter->setShaderProgram(m_shader);
        }
    }
 

samco

4x4 Developer.
Joined
Jul 3, 2007
Messages
932
Best answers
7
Reaction score
197
Location
Spain
Will you share with your shaders?

Code for shaders, at creature.cpp
C++:
internalDrawOutfit
C++:
    if (g_graphics.getPainterEngine() == g_graphics.Painter_OpenGL2)
    {
        if (m_shader && g_painter->hasShaders() && g_graphics.shouldUseShaders()) {
            m_shader->bind();
            m_shader->setUniformValue(ShaderManager::OUTFIT_ID_UNIFORM, 0);
            g_painter->setShaderProgram(m_shader);
        }
    }
Could you elaborate? how to use specific effect?
 

Oskar1121

Veteran OT User
Joined
Jul 15, 2009
Messages
572
Best answers
0
Reaction score
286
Location
Poland
Creature.h
C++:
    void setShader(const PainterShaderProgramPtr& shader, float fadein, float fadeout);

PainterShaderProgramPtr m_shader;
creature.cpp
C++:
#include "shadermanager.h"

m_shader = g_shaders.getDefaultItemShader();

void Creature::setShader(const PainterShaderProgramPtr& shader, float fadein, float fadeout)
{
    if (m_shader == shader)
        return;

    m_shader = shader;
}

    if (g_graphics.getPainterEngine() == g_graphics.Painter_OpenGL2)
    {
        if (m_shader && g_painter->hasShaders() && g_graphics.shouldUseShaders()) {
            m_shader->bind();
            m_shader->setUniformValue(ShaderManager::OUTFIT_ID_UNIFORM, 0);
            g_painter->setShaderProgram(m_shader);
        }
    }
luafunctions.cpp
C++:
    g_lua.bindClassMemberFunction<Creature>("setShader", &Creature::setShader);
How to use, probably you've game_shaders in your mods/modules folder, so you've some default shaders right now to use.
You can use that functions on two ways, in .lua or .cpp.

Cpp way, protocolgameparse.cpp above
C++:
g_map.addCreature(creature);
Add
Code:
creature->setShader(g_shaders.getShader("Radial Blur"), 0, 0);
LUA way, create UICreature/Creature widget and call this function:
Lua:
reature:setShader(g_shaders.getShader('Radial Blur'), 0, 0)
 

spekdrum

Active Member
Joined
Sep 20, 2009
Messages
78
Best answers
1
Reaction score
41
Hi people, this our custom client for ADream OT.
I've been working during last year improving OTClient (from Edubart) for Alessya's Dream OT. This video shows some of the key features.
Indoor / outdoor shadowing, cloud shadows, light effects like realistic night, pro sounds fx, atmosphere sounds and original sound tracks, hunt analyzer, etc.
 

oen432

Excellent OT User
Joined
Oct 3, 2014
Messages
853
Best answers
33
Reaction score
786
Location
Poland
Hi people, this our custom client for ADream OT.
I've been working during last year improving OTClient (from Edubart) for Alessya's Dream OT. This video shows some of the key features.
Indoor / outdoor shadowing, cloud shadows, light effects like realistic night, pro sounds fx, atmosphere sounds and original sound tracks, hunt analyzer, etc.
Ugh, Tibia with sounds. These shadows are not really looking good, mostly because shadowing (dark colors) on sprites is inconsistent. Poor choice of font in windows like skills, stats etc.
 

Night Wolf

I don't bite.
Premium User
Joined
Feb 10, 2008
Messages
366
Best answers
3
Reaction score
490
Hi people, this our custom client for ADream OT.
I've been working during last year improving OTClient (from Edubart) for Alessya's Dream OT. This video shows some of the key features.
Indoor / outdoor shadowing, cloud shadows, light effects like realistic night, pro sounds fx, atmosphere sounds and original sound tracks, hunt analyzer, etc.
This is looking really good, congratulations mate.
I just think the font looks a bit odd on the skill panel.
 

hellboy

Well-Known Member
Joined
Apr 6, 2008
Messages
455
Best answers
4
Reaction score
77
Location
player:getTown()
Hi people, this our custom client for ADream OT.
I've been working during last year improving OTClient (from Edubart) for Alessya's Dream OT. This video shows some of the key features.
Indoor / outdoor shadowing, cloud shadows, light effects like realistic night, pro sounds fx, atmosphere sounds and original sound tracks, hunt analyzer, etc.
Looks great.
 
Top