Search Unity

NVIDIA Cg Documentation is down!

Discussion in 'Shaders' started by ToshoDaimos, May 4, 2017.

  1. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    Official NVIDIA Cg documentation is down. Where is some other reliable reference? Should we still write shaders in Cg?
     
  2. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    350
  3. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    Technically you've been writing your shaders using straight HLSL for a while now, not Cg. There's a hand full of Cg-isms left in the ShaderLab notation, and a few functions that seem to behave like Cg but are actually just because Unity has setup a #define someplace to replicate the older Cg behavior to keep backwards compatibility.
     
    KarlosZafra likes this.
  4. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    So simply HLSL is the destination. I heard somewhere that Cg is just a dialect of it.
     
  5. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    Cg is very HLSL like, with some very minor differences, which is why when they changed over to HLSL sometime during Unity 4.0 no one noticed.

    Cg existed as a language designed to be OpenGL and DirectX agnostic, but probably a combination of the several existing projects that can convert from one to the other (mostly) seamlessly, the growing disparity between the two APIs, and most people not really needing to support both Nvidia stopped working on it.
     
    KarlosZafra likes this.
  6. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    350
    If only there is any ShaderLab/HLSL tutorial like Nvidia's Cg tutorial geared towards newbies...
     
  7. boyd600

    boyd600

    Joined:
    Mar 22, 2009
    Posts:
    49
  8. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
  9. mradfo21

    mradfo21

    Joined:
    May 16, 2013
    Posts:
    194
    this is crippling
     
  10. Lulucifer

    Lulucifer

    Joined:
    Jul 8, 2012
    Posts:
    358