1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Very important documentation for CgFx missing ?!

Discussion in 'Nvidia' started by Skybuck Flying, Sep 19, 2009.

  1. 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.
     
    Skybuck Flying, Sep 19, 2009
    #1
    1. Advertisements

  2. Skybuck Flying

    fungus Guest

    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.
     
    fungus, Sep 19, 2009
    #2
    1. Advertisements

  3. // I'm pretty sure it is.

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

    Banned for trolling.

    Bye,
    Skybuck.
     
    Skybuck Flying, Sep 19, 2009
    #3
  4. We're being trolled. The multiple posts, cross-posting, and pages of shit 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, Sep 19, 2009
    #4
  5. 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.
    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
     
    Wolfgang Draxinger, Sep 19, 2009
    #5
  6. 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.
     
    Skybuck Flying, Sep 19, 2009
    #6
  7. 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.
     
    Skybuck Flying, Sep 19, 2009
    #7
  8. 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.
     
    Skybuck Flying, Sep 19, 2009
    #8
  9. 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.
     
    Skybuck Flying, Sep 19, 2009
    #9
  10. 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.
     
    Skybuck Flying, Sep 19, 2009
    #10
  11. Yes it most certainly contra dicts itself, it does have runtime support for
    these annotations:

    "
    CGannotation cgGetFirstTechniqueAnnotation(CGtechnique);
    CGannotation cgGetFirstPassAnnotation(CGpass);
    CGannotation cgGetFirstParameterAnnotation(CGparameter);
    CGannotation cgGetFirstProgramAnnotation(CGprogram);
    CGannotation cgGetNextAnnotation(CGannotation);
    CGannotation cgGetNamedTechniqueAnnotation(CGtechnique,
    const char *);
    CGannotation cgGetNamedPassAnnotation(CGpass, const char *);
    CGannotation cgGetNamedParameterAnnotation(CGparameter,
    const char *);
    CGannotation cgGetNamedProgramAnnotation(CGprogram,
    const char *);
    const float *cgGetFloatAnnotationValues(CGannotation,
    int *nvalues);
    const int *cgGetIntAnnotationValues(CGannotation,
    int *nvalues);
    const char *cgGetStringAnnotationValue(CGannotation);
    const int *cgGetBooleanAnnotationValues(CGannotation,
    int *nvalues);
    "

    Apperently with runtime they mean something else... like executing on gpu or
    something ?

    I guess it's mostly them that are confused about the meaning of the word
    "runtime" ;)

    Bye,
    Skybuck.
     
    Skybuck Flying, Sep 19, 2009
    #11
  12. If you did what we, the regulars (fungus, I, Charles E Hardwidge) told you
    to do, you would be familiar with such terms like "binding".

    And please do us a favour: Don't post at such high rates, this is really
    annoying. Especially then, if one uses a nntp-cache like leafnode,
    configured to store only the most recent N messages in a group. Only post
    if you have something use- and contentfull to say. And before asking any
    random question you come about please keep in mind that Usenet is mostly
    asynchronous and the people reading and writing here are scatterd through
    24 timezones.

    Your spamming made me think to propose to turn comp.graphics.api.opengl into
    a moderated newsgroup. And given it's history I expect, that then among the
    moderators would be at least fungus, Dave Eberly, Charles E Hartwidge and
    maybe I.

    I kindly ask you to stop that. It's highly annoying and makes nobody reading
    your posts, probably you're already in all regulars' filter lists.


    Wolfgang
     
    Wolfgang Draxinger, Sep 19, 2009
    #12
  13. Skybuck Flying

    Dave Eberly Guest

    <snip>

    To the regular readers of these news groups: Based on his incessant
    blog-style posts, we all know that Skybuck Flying is a nut case and
    needs someone to adjust his medication.

    As Wolfgang Draxinger pointed out, I would be all for converting
    comp.graphics.api.opengl and comp.graphics.algorithms to moderated
    news groups just to avoid having crap like S.F.'s inundating the
    groups as well as blocking the spam posts that have just about
    dominated the traffic in c.g.a.

    I do not know the procedure for doing so, but if someone can point
    me to how to do that, I'd volunteer to moderate c.g.a.

    One other thing folks can do that might or might not make a difference
    is to file a complaint with S.F.'s ISP. I have done this a few times over
    the years. Not that cancelling his services would prevent him from
    getting a new ISP and email account, but at least it could make some
    inconvenience.

    From his post headers:
    X-Complaints-To:
     
    Dave Eberly, Sep 20, 2009
    #13
  14. I'm hoping a freezing out will encourage SF to change his ways or get his
    thrills elsewhere. The biggest issue is drowning out new visitors and
    picking up crap from other newsgroups. If ignoring it doesn't work I'll run
    with whatever the general consensus is.

    Holy hell. c.g.a's gone to shit. I can see why you want moderation in there.

    I've found some FAQs on moderation. I haven't dug too deeply into them but
    there are software tools that can take the strain. The biggest hassle is
    having a stable internet connection. A corporate setting with moderation
    embedded in the daily workflow with be ideal. A paid service is available
    that handles the tools hosting.

    NFilter is a client side usenet filter but has its issues. Not all news
    servers supply comprehensive headers, getting people behind a posting policy
    can be tough, and client side tools add a hurdle most people won't jump.

    I've sent a complaint to his ISP.

    Links:

    http://www.faqs.org/faqs/usenet/moderated-ng-faq/
    http://www.algebra.com/~ichudov/stump/
    http://www.nfilter.org/
     
    Charles E Hardwidge, Sep 20, 2009
    #14
  15. Dave Eberly a écrit :
    I am just wondering if this would be a moderation before being
    published, or once the message is posted it can be removed by moderators ?
    In the first case, one could have some "urgent" questions during a
    deadline which couldn't afford a 24h delay before being displayed in the
    forum. We still have the chance that except Skybuck, there is not so
    much spam here compared to other forums (num-analysis,
    comp.programming...), and there is still some traffic here compared to
    some others (c.a.vision, ...).

    Cheers
     
    Nicolas Bonneel, Sep 20, 2009
    #15
  16. Skybuck Flying

    Kaba Guest

    Interesting, I don't see any spam in c.g.a. using my newsreader, except
    the recent S.F. threads. I don't even have any rules/filters on.

    However, when I go view c.g.a. using Google newsgroups, then I can see
    lots of that. Can anyone explain why that is? Is this perhaps a Google-
    specific issue?
     
    Kaba, Sep 20, 2009
    #16
  17. I've a dedicated root server with good connectivity (100MBit/s), that could
    be well used for this task. So at least this would be no problem.


    Wolfgang
     
    Wolfgang Draxinger, Sep 20, 2009
    #17
  18. That's a good question.

    I've looked into the software and it can handle just letting everything
    through automatically so it could work just as fast as it does now only with
    a moderation client sitting in the middle. Filters could take care of the
    worst spam and users can be blacklisted if the need is there. That's
    probably the lightest touch possible.

    The alternative is whitelisting but that can take a bit of work and be a
    PITA for casual visitors posting for the first time.

    In theory anyone can delete posts from newsgroup servers but a lot of
    service providers have switched that off. Not every server will accept the
    deletion message so it's probably a waste of time bothering.
     
    Charles E Hardwidge, Sep 20, 2009
    #18
  19. I using my ISP's server. My guess is some servers allow everything through
    and others have some spam filtering mechanism in place.
     
    Charles E Hardwidge, Sep 20, 2009
    #19
  20. I've got no idea about the server management issues but QoS and traffic
    volume don't look too onerous.

    I've looked into running a newsgroup server in the past to extend access to
    clients without ISP provision but don't have the space/capacity/uptime
    guarantee to make it happen at the moment.
     
    Charles E Hardwidge, Sep 20, 2009
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.