[2.1] Don’t like fiddling with writing your own shaders

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
123iamking
Gremlin
Posts: 152
Joined: Sat Aug 12, 2017 4:16 pm
x 4

[2.1] Don’t like fiddling with writing your own shaders

Post by 123iamking »

I decided to use Ogre 2.1 because of this article.
But I'm very new to graphic programming, so I barely understand this sentence.
You don’t like fiddling with writing your own shaders to get pretty graphics or even simple stuff like shadows.
Now I'm a little familiar with it, I realize my understanding, when I first read this sentence, is wrong :)
At first, I thought that mean shader script (hlsl - high level shader language) is automatically generated.
But now, I see that in the tutorial these script still have to be written by hand - no automatically.
Thus I'm curious what this sentence actually means.

Thanks for reading :#
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 169

Re: [2.1] Don’t like fiddling with writing your own shaders

Post by xrgo »

it means that... even while making a simple compositor workspace you can have nice Pbs materials and shaders out of the box
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5588
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1413
Contact:

Re: [2.1] Don’t like fiddling with writing your own shaders

Post by dark_sylinc »

At first, I thought that mean shader script (hlsl - high level shader language) is automatically generated.
Yes, that's what it means. Ogre 2.1 generates HLSL automatically for you to handle stuff like PBS (Physically Based Shading) and Unlit materials (no lighting - e.g. particle FXs, billboards, GUI).

We don't automatically generate postprocessing shader code (like HDR, Bloom, radial blur, etc), but we provide examples for you to copy paste and integrate in your application (hence the Postprocessing sample)
123iamking wrote:But now, I see that in the tutorial these script still have to be written by hand - no automatically.
What gave you that impression?
Taking a quick look at your posts, you asked a question about Sample_TutorialCompute01_UavTextures.
Perhaps what confused you is that this sample explains how to use Compute and UAVs in Ogre. But this is an advanced topic, for those wanting to write compute shaders that interface with Ogre.
Those who "don’t like fiddling with writing your own shaders" like artists and non-graphics programmer don't really have to look at this sample at all. Just ignore it.

Ogre comes with a set of components (HlmsPbs and HlmsUnlit) that will satisfy most, if not all, of your needs graphics needs. But it's also flexible that can be customized by writing your own shaders.
123iamking
Gremlin
Posts: 152
Joined: Sat Aug 12, 2017 4:16 pm
x 4

Re: [2.1] Don’t like fiddling with writing your own shaders

Post by 123iamking »

Thanks all for your information, it's very useful :D
dark_sylinc wrote:
123iamking wrote:But now, I see that in the tutorial these script still have to be written by hand - no automatically.
What gave you that impression?
Taking a quick look at your posts, you asked a question about Sample_TutorialCompute01_UavTextures.
You are right. The sample Sample_TutorialCompute01_UavTextures gave me that impression :D
So as I understand now: the samples show how to manually write shaders for Ogre (if we want), normally, we don't have to. Got it, thank you dark_sylinc :)
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5588
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1413
Contact:

Re: [2.1] Don’t like fiddling with writing your own shaders

Post by dark_sylinc »

123iamking wrote: You are right. The sample Sample_TutorialCompute01_UavTextures gave me that impression :D
So as I understand now: the samples show how to manually write shaders for Ogre (if we want), normally, we don't have to. Got it, thank you dark_sylinc :)
Not all of them, just the Compute and UAV ones happen to be more shader oriented and for advanced users (+ ReconstructPosFromDepth). A few lay inbetween in terms of difficulty (Tutorial_SSAO; Tutorial_Distortion; Tutorial_Terrain), others have no shader code at all (PbsMaterials, Forward3D, etc)
Post Reply