Motherboard Forums


Reply
Thread Tools Display Modes

Very important documentation for CgFx missing ?!

 
 





















Skybuck Flying
Guest
Posts: n/a

 
      09-19-2009, 08:48 PM


Hello,

I am wondering how to add "textures" to my shaders in FX Composer 2.5.

I want to be able to write my shader from scratch so I know what I am doing
and so that there isn't any clutter.

The big question on my mind is:

How to add the texture image/file to the material/shader...

This is documented nowhere !

There is a lot of "talk" about TEXCOORD0 and all of that which is pretty
useless if I as a programmer do not know how to "load"/"specify" my texture
into the shader ?!?

It turns out the phong effect has some special code example:

texture NormalTexture <
string ResourceName = "default_bump_normal.dds";
string UIName = "Normal-Map Texture";
string ResourceType = "2D";
>;


Do I now have to start guessing what all of this does ?!?!?!?!?!

Or is there actually some documentation explaining how to get a basic
texture shader + TEXTURE IMAGE working ?!
(I already read the entire FX Composer User Guide and it doesn't explain
this at all !)

Pretty retarded to "talk" about texturing if the basics aren't dealt with
first ?!

Bye,
Skybuck.


 
Reply With Quote
 
fungus
Guest
Posts: n/a

 
      09-19-2009, 09:14 PM
On Sep 19, 9:48*pm, "Skybuck Flying" <BloodySh...@hotmail.com> wrote:
>
> The big question on my mind is:
>
> How to add the texture image/file to the material/shader...
>
> This is documented nowhere !
>


I'm pretty sure it is.

I know you don't have time for pointless things
like reading documentation as it only slows down
your coding but binding a texture is very basic
stuff.


--
<\___/>
/ O O \
\_____/ FTB.
 
Reply With Quote
 
Skybuck Flying
Guest
Posts: n/a

 
      09-19-2009, 09:16 PM

"fungus" <> wrote in message
news:0524f645-6d85-49fa-87e1-...
On Sep 19, 9:48 pm, "Skybuck Flying" <BloodySh...@hotmail.com> wrote:
>
> The big question on my mind is:
>
> How to add the texture image/file to the material/shader...
>
> This is documented nowhere !
>


// I'm pretty sure it is.

I am pretty sure it's not or you don't know it.

Banned for trolling.

Bye,
Skybuck.


 
Reply With Quote
 
Charles E Hardwidge
Guest
Posts: n/a

 
      09-19-2009, 09:39 PM
"fungus" <> wrote in message
news:0524f645-6d85-49fa-87e1-...
> On Sep 19, 9:48 pm, "Skybuck Flying" <BloodySh...@hotmail.com> wrote:
>>
>> The big question on my mind is:
>>
>> How to add the texture image/file to the material/shader...
>>
>> This is documented nowhere !

>
> I'm pretty sure it is.
>
> I know you don't have time for pointless things
> like reading documentation as it only slows down
> your coding but binding a texture is very basic
> stuff.


We're being trolled. The multiple posts, cross-posting, and pages of **** is
a similar pattern to the Point & Shoot Troll in the photography groups, and
other nutballs I've seen trash places. Just treat it like spam.

FU's trimmed to save other NG's sanity.

--
Charles E Hardwidge

 
Reply With Quote
 
Wolfgang Draxinger
Guest
Posts: n/a

 
      09-19-2009, 09:55 PM
Skybuck Flying wrote:

> I am pretty sure it's not or you don't know it.


He knows, and he told you: You've to bind the texture. The problem with your
original post is, that your code snippet lacks the context.

Worse: This snippet doesn't look like Cg, but like a part of FXComposer's
own file format - which you can't load using Cg.

> Banned for trolling.


Bad choice, fungus is propbably one of the most experienced guys in
c.g.a.opengl. On the contrary the way how you treat c.g.a.opengl definitly
matches several criteria of trolling.

So far you didn't heed our advise, to read the _documentation_. And with
documentation I don't mean tutorials, howtos, or other stripped/dumbed down
texts. So far you only did Cargo Cult Programming, i.e. you imitate what
you saw in other people's code without actually understanding what you do;
of course on the surface you might have some idea of what's going on. But
to really grasp the concepts in OpenGL, shader programming, Cg and so forth
you *must* first understand the underlying concepts. And this can only be
done, by reading the documentation and learning the basic terms of the
science called Computer Graphics.

Wolfgang
--
OpenGL tip #42:
How to exactly map texture texels to screen pixels:
<http://preview.tinyurl.com/cgndc8>
 
Reply With Quote
 
Skybuck Flying
Guest
Posts: n/a

 
      09-19-2009, 11:13 PM

"Skybuck Flying" <> wrote in message
news:c5454$4ab535a5$d53372a9$ b.home.nl...
> Hello,
>
> I am wondering how to add "textures" to my shaders in FX Composer 2.5.
>
> I want to be able to write my shader from scratch so I know what I am
> doing and so that there isn't any clutter.
>
> The big question on my mind is:
>
> How to add the texture image/file to the material/shader...
>
> This is documented nowhere !
>
> There is a lot of "talk" about TEXCOORD0 and all of that which is pretty
> useless if I as a programmer do not know how to "load"/"specify" my
> texture into the shader ?!?
>
> It turns out the phong effect has some special code example:
>
> texture NormalTexture <
> string ResourceName = "default_bump_normal.dds";
> string UIName = "Normal-Map Texture";
> string ResourceType = "2D";
>>;


According to the newly downloaded documentation this is apperently called an
"annotation"

From www.dictionary.com:

"
1.a critical or explanatory note or body of notes added to a text.
"

(fungus was a little bit usefull after all since he mentioned the word
"binding" which got me looking into this... I shall unban the poor bastard !
=D)

Bye,
Skybuck.


 
Reply With Quote
 
Skybuck Flying
Guest
Posts: n/a

 
      09-19-2009, 11:14 PM

"Skybuck Flying" <> wrote in message
news:28244$4ab53c03$d53372a9$ b.home.nl...
>
> "fungus" <> wrote in message
> news:0524f645-6d85-49fa-87e1-...
> On Sep 19, 9:48 pm, "Skybuck Flying" <BloodySh...@hotmail.com> wrote:
>>
>> The big question on my mind is:
>>
>> How to add the texture image/file to the material/shader...
>>
>> This is documented nowhere !
>>

>
> // I'm pretty sure it is.
>
> I am pretty sure it's not or you don't know it.
>
> Banned for trolling.


Ok he unbanned, at least he mentioned the word "binding"... which got me
looking into things a bit further.

It's a dog's bone but it was at least something =D

Bye,
Skybuck.


 
Reply With Quote
 
Skybuck Flying
Guest
Posts: n/a

 
      09-19-2009, 11:16 PM
Actually the texture word would be called the "effect parameter"... it
seems...

The stuff inside would be the annotations ?!?

Or is the whole thing consider an annotation ?!? <- Probably... since
texture would be ignored by runtime as well...

So effect parameter = annotation

Bye,
Skybuck.


 
Reply With Quote
 
Skybuck Flying
Guest
Posts: n/a

 
      09-19-2009, 11:19 PM
These annotations are only ment for applications... for example they could
use it to load the textures and so forth...

So FX Composer uses these annotations to do it's thing...

But ultimately in my own programs I would have to program annotation support
or myself or find my own custom solution to managing the textures and
such...

However I will probably do special things anyway so for me this wouldn't be
that big deal..

But for graphics/game programming it would be nice if the game had support
for reading cgfx files ?!?

Not sure what's common practice and if there are libaries/code available for
that ?

Bye,
Skybuck.


 
Reply With Quote
 
Skybuck Flying
Guest
Posts: n/a

 
      09-19-2009, 11:22 PM
Actually the documentation more or less seems to contra-dict itself
somewhat...

Later it says:

cgCreateEffectFromFile

Which seems to support these annotations/cgfx files ?!? Not sure about that.

Bye,
Skybuck.


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Semi-successful repair of failed MacBook -- reactions appreciated AES Apple 1 01-07-2009 11:40 PM
Re: Help replacing missing a boot.ini file Ben Myers Dell 0 11-10-2008 04:05 PM
McCain, BOMBS for Missing-Money !...& MORE !-() Dell 0 10-26-2008 07:35 AM
Dell's Online Documentation and Quality Issues Reporter Dell 14 04-25-2008 11:55 AM
Problems with a DS2405 multipath JBOD missing disks Daniel Loeb HP 0 02-27-2008 04:33 PM


All times are GMT. The time now is 04:43 AM.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43