From 49c662b55851caf6b81c39a079000e5db5fc26dc Mon Sep 17 00:00:00 2001 From: Kevin Rushforth Date: Tue, 15 Feb 2005 21:47:30 +0000 Subject: More web page updates git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@125 ba19aa83-45c5-6ac9-afd3-db810772062c --- www/j3d1_4/api-changes.html | 4 ++ www/j3d1_4/shaders.html | 107 +++++++++++++++++++++++++++++++++----------- 2 files changed, 84 insertions(+), 27 deletions(-) diff --git a/www/j3d1_4/api-changes.html b/www/j3d1_4/api-changes.html index bae0731..86efaa1 100644 --- a/www/j3d1_4/api-changes.html +++ b/www/j3d1_4/api-changes.html @@ -67,6 +67,10 @@ III. New classes and interfaces (in javax.media.j3d) ---------------- public class ShaderAppearance extends Appearance + ShaderAttributes + ---------------- + public class ShaderAttributes extends NodeComponent + Shader ------ public abstract class Shader extends NodeComponent diff --git a/www/j3d1_4/shaders.html b/www/j3d1_4/shaders.html index 9bd46f5..cf6c91e 100644 --- a/www/j3d1_4/shaders.html +++ b/www/j3d1_4/shaders.html @@ -6,26 +6,16 @@ Java 3D 1.4 Shaders -

Shaders in Java 3DTM 1.4

+

Shaders in Java 3DTM 1.4

Introduction and pointer to discussion forum

-

If you wandered over here looking for a completed draft -programmable shading specification for -Java 3DTM 1.4 that you can -review, you are in the wrong place; or more accurately, the right -place at the wrong time. Come back in about 1-2 months and things should -be in state where you can review a fairly complete draft -specification. If, on the other hand, you'd like to help us define and -evolve the programmable shading API in Java 3D 1.4, please read -on. -

- -

This is a rough first draft of what we are thinking in terms -of programmable shader support in Java 3D 1.4. As we mentioned at -JavaOne, we plan to do the 1.4 API specification under the auspices of -the Java Community Process (JCP). However, we very much want to -involve the larger community in API discussions for programmable -shaders, so please join in the discussion. +

Here is the latest rough first draft of what we are thinking in +terms of programmable shader support in Java 3DTM for 1.4. We plan to formalize the 1.4 API +specification under the auspices of the Java Community Process +(JCP). However, we very much want to involve the larger community in +API discussions for programmable shaders, so please join in the +discussion.

We have created a thread on the Java 3D discussion forum for @@ -78,14 +68,31 @@ public abstract class CgShader extends Shader method: validate(Canvas3D) ??? -

  • Changes to existing Appearance class (or maybe create new -ShaderAppearance subclass):
  • +
  • New ShaderAppearance class:
  • + +
  • New SystemAttributes class:
  • + +

    Click on the following link for a preliminary look at the

    Shader Parameters

    +

    NOTE: This section is under construction. For the most up to date +API definition, please see the javadoc for the new ShaderAttributes +class. +

    +

    Programmable shaders define two types of parameters: uniform and varying. As the names imply, uniform parameters are constant (within a primitive), while varying parameters can vary on per-vertex or @@ -138,16 +151,56 @@ may change from primitive to primitive, but are constant for each vertex (for vertex shaders) or fragment (for fragment shaders) of a single primitive. Examples of uniform parameters include a transformation matrix, a texture map, lights, lookup tables, -etc. Several Java 3D state attributes are automatically available +etc.
    + + +
    +We have created a new ShaderAttributes object with following new attributes: + +

    + +See the javadoc for the new ShaderAttributes +class for more details. + +Issues
    + + + +
    +Automatic variables
    +Several Java 3D state attributes are automatically available to the shader program as pre-defined uniform parameters. The application doesn't need to do anything to pass these parameters in to the shader program. The implementation of each shader language (e.g., Cg, GLSL) defines its own mapping from Java 3D attribute to uniform variable name.
    -
    -We need additional API to allow applications to pass in uniform -parameters that do not correspond to a pre-defined Java 3D -attribute...
    TODO: Finish this...
    +
    A partial list of Java 3D attributes that are mapped to shader attributes follows: -- cgit v1.2.3