OpenGL Shader Compiler Dist (shader_dev)

axetion

New member
Aug 26, 2022
2
2
3
Hello,

Does anyone know where I could find the shader_dev dist that contains the islc & ipf2ogl tools? The shader_eoe dist with the libraries was on CD and is easy to find, but it seems like shader_dev may only have been available through sgi.com:

https://web.archive.org/web/20031224184517/http://access.sgi.com/SurfZone/tar-files/6.5_opengl_shader_3.1.tardist (from https://web.archive.org/web/20040226120249/http://www.sgi.com:80/products/evaluation/6.5_opengl_shader_3.1/)
https://web.archive.org/web/20040817042545/http://access.sgi.com/SurfZone/tar-files/SGIshader_dev-3.1.i386.rpm (from https://web.archive.org/web/20040910084123/http://www.sgi.com:80/products/evaluation/Linux_opengl_shader_3.1/)

Any help in tracking down either the IRIX dist or maybe the Linux package would be greatly appreciated. I've poked through the archive of the SGI ftp-site and most disc dumps with no luck.
 
  • Like
Reactions: Elf

axetion

New member
Aug 26, 2022
2
2
3
@axetion so what do these programs do? Meh I guess I'll install them also and poke around

https://www.mediafire.com/file/e76n3zhq90pg7sm/openGL_Shaders_IRIX.rar/file
Awesome, thanks! Yeah, sadly the 3.1 dist seems to be corrupted in some way, but the 2.4 one does work.

A bit of explanation for what this is if you're interested... this was an effort by SGI to get something similar to RenderMan's shaders but for hardware rendering on plain OpenGL 1 (well before programmable pixel shaders were in hardware or standardized). Here's an example I compiled:

Code:
surface test(parameter color c1 = 0.0;
             uniform string tex = "TexName")
{
    FB  = c1;
    FB *= texture(tex);
    FB -= 0.5;
}
The islc tool outputs an IL of sorts in which it's broken it down into passes:

Code:
IPFFileMajorRev 2
IPFFileMinorRev 3
IPFColorVar "s0_c1" (0 0 0 0)
UnconditionalPassGroup {
  GeomPass
    colormask: 0xf
    stencil: ALWAYS ref 0x1 msk 0xff
             sfail KEEP zfail KEEP zpass REPLACE wmask 0xff
    depth: LEQUAL
    texture: texture_unit 0 name "TexName"
    texgen: texture_unit 0 texgen_code 0.000000
            S USER
            T USER
            R USER
            Q USER
    texenv: texture_unit 0 MODULATE
    color: "s0_c1"
  GeomPass
    colormask: 0xf
    stencil: LEQUAL ref 0x1 msk 0xff
             sfail KEEP zfail KEEP zpass KEEP wmask 0xffffffff
    blend: eqn REVERSE_SUBTRACT src ONE dst ONE
    depth: LEQUAL
    color: (0.5 0.5 0.5 0.5)
}
Then ipf2ogl turns this into C with OpenGL calls (abbreviated, also all the comments were made by it):

Code:
    /*********************************
     * Start Geom Pass. Pass: 0    
     ********************************/
    ...
    /* IPF_Texture_Attribute */
    /* User defined file based texture: TexName */
    texture_dimension = load_texture ("TexName", load_texture_user_data);
    switch (texture_dimension) {
    case 1:
        glEnable (GL_TEXTURE_1D);
        break;
    case 0:
    /* 0 aliased to 2 for compatibility with v1.0 texture
     * callback semantics. */
    case 2:
        glEnable (GL_TEXTURE_2D);
        break;
    case 3:
        glEnable (GL_TEXTURE_3D);
        break;
    }
    ...
    /* IPF_Texenv_Attribute */
    glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

    /* IPF_Color_Attribute */
    glColor4fv (c_s0_c1);
    ...
    /*********************************
     * Start Geom Pass. Pass: 1    
     ********************************/
     ...
    /* IPF_Blend_Attribute */
    glEnable (GL_BLEND);
    glBlendEquationEXT (GL_FUNC_REVERSE_SUBTRACT_EXT);
    glBlendFunc (GL_ONE, GL_ONE);
    ...
    /* IPF_Color_Attribute */
    color_value [0] = 0.500000;
    color_value [1] = 0.500000;
    color_value [2] = 0.500000;
    color_value [3] = 0.500000;
    glColor4fv (color_value);
So it can do the color * texture part in the first draw, then it uses blending to subtract 0.5 in a second draw. All old non-programmable GL. It's a really interesting tool and bit of history IMO.

If anyone has a lead on the Linux version, that would be really cool too.
 
  • Like
Reactions: Elf

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu