yys

Maya插件开发,(多多练习英文吧~)

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Projects on sourceforge

Fractal planet and terrain generator
Interactive application to generate and view random fractal planets andterrain with oceans, mountains, icecaps and rivers, then export them toPOV-Ray format or Blender. Written in C++ using Qt and OpenGL.

GLT OpenGL C++ Toolkit
GLT is a C++ class library for programming interactive 3D graphics with OpenGL.

GLFW
GLFW is a portable framework for OpenGL application development. Ithandles operating system specific tasks such OpenGL window management,resolution switching, keyboard, mouse and joystick input, timer input,creating threads, and more.

FFFF - Fast Floating Fractal Fun
FFFF is the fastest Win32/OSX/Linux/IRIX Mandelbrot generator. FeaturesOpenGL, realtime zoom, SSE/AltiVec QuadPixel, SSE2/3DNow! DualPixelcalc, FPU per pixel calc, GPU asm (Fragment/Vertex) calc,multiprocessor support, and benchmarking. Opt asm code!

G-Truc Creation
G-Truc Creation is an open source and creativity enthousiat website. Asa main goal, G-Truc Creation features an OpenGL Framework (GLF). It's aC++ based project that aims to improve OpenGL programmers work withlibraries, documentation, samples and too
http://www.g-truc.net/

Klimt
Klimt (formerly known as SoftGL) is a 3D library with a similiar API tothat of OpenGL and OpenGL|ES, targeted for mobile devices. We aresearching for developers. If you want to join send an email to theproject leader.

pdnmesh Finite Element program
An automatic 2D Delaunay mesh generator and solver for Finite ElementAnalysis. Can solve 2D field problems (Poisson and HelmholtzEquations). Can use LAPACK/ARPACK solvers producing OpenGL/Postscriptoutput. Uses C/GTK/GTKGLExt/MFC. Runs on Win32/Unix.

Inventor
LGPL Open Inventor (tm) C++ API using OpenGL from original SGI source.Inventor is the standard API for developers of Windows, Linux, andother Unix 3D applications. Current version only works on Irix andLinux. Port in progress to other platforms.

Internet C++/Internet Virtual Machine
Internet C++/Internet Virtual Machine is a high-speed, open-sourcealternative to Java and .NET. Applications written in standardlanguages, such as C and C++. OpenGL 1.2 support brings portablehigh-speed 3D graphics and games.

MathGL++
MathGL++ is a class library for fast C++ maths for use in OpenGL C++projects. Easy to use and similar to the OpenGL API. Matricies,Vectors, Quaternions, Linear polynomials with eigen systems are allgoing to be included.

 

 

GLI
http://www.glinterface.com/home.html
GLI is a multi-platform, hardware-accelerated userinterface and animation engine powered by OpenGL. With GLI, realtime compositing of animated, high resolution images and movies is now possible on consumer PC hardware.
 
GL++ (opengl C++ wrapper)
This encapsulates some of the higher level functions of OpenGL usingextensions into C++ objects. These at the moment in time areframebuffer objects and shaders

oglpp  (opengl C++ wrapper)
http://code.google.com/p/oglpp/
 

 

GLSW  (The OpenGL Shader Wrangler)

 

http://prideout.net/blog/?p=11
 

 

---------------------------------------------------------------------------------------------------------------------------------------------------------

GLSL

教程,glsl c++ wrapper http://www.clockworkcoders.com/oglsl/index.html

------------------
links
------------------
http://wiki.flightgear.org/index.php/GLSL_Shader_Programming_Resources

http://wiki.flightgear.org/index.php/Howto:_Shader_Programming_in_FlightGear

 

 

 

------------------
codes
------------------
http://www.geeks3d.com/20100423/ruin-island-opengl-glsl-demo-with-full-source-code/

http://www.geeks3d.com/20090407/metatunnel-an-opengl-1k-demo-with-source-code/

http://www.xbdev.net/directx3dx/specialX/Fur/index.php  (fur)
http://www.xbdev.net/shaderx/fx/index.php (fx)

 

 

http://prideout.net (Very Cool Demos! glsl, fluid, etc)   http://prideout.net/blog/

 

https://mmack.wordpress.com/


                    GLSL shader editor

GeeXlab  http://www.geeks3d.com/geexlab/code_samples.php

GLSL sandbox   http://glsl.heroku.com/

live code   http://kagamin.net/hole/lc/

Shader Toy  http://www.iquilezles.org/apps/shadertoy/

http://sourceforge.net/projects/lumina/

http://cumbia.informatik.uni-stuttgart.de/glsldevil/   (debugger indeed)

http://webglplayground.net/

 

http://cg.in.tu-clausthal.de/teaching/shader_maker/index.shtml

 

 

------------------
projects
------------------
http://flightgear.org/

 

http://3dshaders.com/home/index.php?option=com_weblinks&catid=13&Itemid=33

Open Scene Graph
An open source scene graph that supports GLSL
gDEBugger
A very useful tool for developing OpenGL applications
GLSL Compiler Front-end
Source code for the industry standard GLSL parser
GLSL Parser Test Executable
GLSLParserTest is an application that allows you to quickly verifywhether or not your OpenGL driver properly supports the OpenGL ShadingLanguage specification
GLSL Parser Test Source Code
Source code for GLSL Parser Test (11Mb download)
GLSL Validate Executable
GLSLvalidate is a GUI driven application that allows you to quicklyverify that your GLSL shader is written according to the OpenGL ShadingLanguage specification.
GLSL Validate Source Code
Source code for GLSL validate (10Mb download)
Specifications
Most recent GLSL specification documents
Sample Chapter
A sample chapter from the first edition is available at the Addison-Wesley web site
API Documentation
On-line reference pages for GLSL API entry points

---------------------------------------------------------------------------------------------------------------------------------------------------------


SSS-VS
/////////////////////////

// SUB-SURFACE SCATTER VS //

////////////////////////

/* --------------------------

SubScatter Vertex Shader:

Fake sub-surface scatter lighting shader by InvalidPointer 2008.

Found at 
http://www.gamedev.net/community/forums/topic.asp?topic_id=481494HLSL > GLSL translation

toneburst 2008

-------------------------- 
*/

// Set light-position

uniform vec3 LightPosition;

// Varying variables to be sent to Fragment Shader

varying vec3 worldNormal, eyeVec, lightVec, vertPos, lightPos;

void subScatterVS(in vec4 ecVert)

{

lightVec 
= LightPosition - ecVert.xyz;

eyeVec 
= -ecVert.xyz;

vertPos 
= ecVert.xyz;

lightPos 
= LightPosition;

}

///////////////

// MAIN LOOP //

///////////////

void main()

{worldNormal 
= gl_NormalMatrix * gl_Normal;

vec4 ecPos 
= gl_ModelViewProjectionMatrix * gl_Vertex;

// Call function to set varyings for subscatter FS

subScatterVS(ecPos);

//Transform vertex by modelview and projection matrices

gl_Position 
= ecPos;

//Forward current texture coordinates after applying texture matrix

gl_TexCoord[
0= gl_TextureMatrix[0* gl_MultiTexCoord0;

}
SSS-FS
////////////////////////////

/ SUB-SURFACE SCATTER FS //

////////////////////////////

/* --------------------------

SubScatter Fragment Shader:

Fake sub-surface scatter lighting shader by InvalidPointer 2008.

Found at 
http://www.gamedev.net/community/forums/topic.asp?topic_id=481494

HLSL > GLSL translation

toneburst 2008

-------------------------- 
*/

// Variables for lighting properties

uniform 
float MaterialThickness;

uniform vec3 ExtinctionCoefficient; 
// Will show as X Y and Z ports in QC, but actually represent RGB values.

uniform vec4 LightColor;

uniform vec4 BaseColor;

uniform vec4 SpecColor;

uniform 
float SpecPower;

uniform 
float RimScalar;

//uniform sampler2D Texture;

// Varying variables to be sent to Fragment Shader

varying vec3 worldNormal, eyeVec, lightVec, vertPos, lightPos;

float halfLambert(in vec3 vect1, in vec3 vect2)

{

float product = dot(vect1,vect2);

return product * 0.5 + 0.5;

}

float blinnPhongSpecular(in vec3 normalVec, in vec3 lightVec, in float specPower)

{

vec3 halfAngle 
= normalize(normalVec + lightVec);

return pow(clamp(0.0,1.0,dot(normalVec,halfAngle)),specPower);

}

// Main fake sub-surface scatter lighting function

vec4 subScatterFS()

{

float attenuation = 10.0 * (1.0 / distance(lightPos,vertPos));

vec3 eVec 
= normalize(eyeVec);

vec3 lVec 
= normalize(lightVec);

vec3 wNorm 
= normalize(worldNormal);

vec4 dotLN 
= vec4(halfLambert(lVec,wNorm) * attenuation);

//dotLN *= texture2D(Texture, gl_TexCoord[0].xy);

dotLN 
*= BaseColor;

vec3 indirectLightComponent 
= vec3(MaterialThickness * max(0.0,dot(-wNorm,lVec)));

indirectLightComponent 
+= MaterialThickness * halfLambert(-eVec,lVec);

indirectLightComponent 
*= attenuation;

indirectLightComponent.r 
*= ExtinctionCoefficient.r;

indirectLightComponent.g 
*= ExtinctionCoefficient.g;

indirectLightComponent.b 
*= ExtinctionCoefficient.b;

vec3 rim 
= vec3(1.0 - max(0.0,dot(wNorm,eVec)));

rim 
*= rim;

rim 
*= max(0.0,dot(wNorm,lVec)) * SpecColor.rgb;

vec4 finalCol 
= dotLN + vec4(indirectLightComponent,1.0);

finalCol.rgb 
+= (rim * RimScalar * attenuation * finalCol.a);

finalCol.rgb 
+= vec3(blinnPhongSpecular(wNorm,lVec,SpecPower) * attenuation * SpecColor * finalCol.a * 0.05);

finalCol.rgb 
*= LightColor.rgb;

return finalCol;

}

////////////////

// MAIN LOOP //

////////////////

void main()

{

gl_FragColor 
= subScatterFS();

}


========================================================

Visualization Library

(MC,kdtree,glsl shader, opengl wrapper)

OpenGL 4.0 review

OpenGL Samples Pack 3.3.0.0 released

opengl 3&4 with glsl  samples   http://nopper.tv/opengl.html

http://www.geeks3d.com/20111111/simple-introduction-to-geometry-shaders-glsl-opengl-tutorial-part1/

 

========================================================

 

*************************** opengl pipeline **************************
1.Geometry specification
2.Per-Vertex operation (TRANSFORMATION AND LIGHTING)
    vertex positions are transformed by the modelview and projection matrices,
    normals are transformed by the inverse transpose of the upper leftmost 3x3 matrix taken from the modelview matrix,
    texture coordinates are transformed by the texture matrices,
    lighting calculations are applied to modify the base color,
    texture coordinates may be automatically generated,
    color material state is applied,
    point sizes are computed.
3.Primitive Assembly (vertex data is collected into complete primitives)
4.Primitive Processing
    clip
    perspective projection
    culling
5.Rasterization
    (1. primitives (points, lines, or polygons) are decomposed into smaller units(called fragments) corresponding to pixels in the destination framebuffer.
     2.At the time they are rasterized, vertices have a primary color and a secondary color. The glShadeModel function specifies whether these color values are interpolated between the vertices (SMOOTH SHADING) or whether the color values for the last vertex of the primitive are used for the entire primitive (FLAT SHADING).
     3.Each type of primitive has different rasterization rules and different OpenGL state.
    )
6.Fragment Processing (a number of operations occur on fragments, e.g. TextureMapping, FOG, ColorSum)
7.Per-Fragment Operations
    PIXEL OWNERSHIP TEST
    SCISSOR TEST
    ALPHA TEST
    STENCIL TEST
    DEPTH TEST
    Blending, dithering, and logical operations
8.Framebuffer Operations( glDrawBuffer(s), glColorMask, glDepthMask, glStencilMask, glClearColor, glClearDepth, glClearStencil, glClearAccum, glFlush, glFinish )
-----------------
Finally, graphics primitives defined by the application are converted into pixels in the framebuffer
*****************************************************



Drawing Images
    Pixel Unpacking
    (pixels read from application memory are converted into a coherent stream of pixels.
    ~ determine how the image data should be read and interpreted.
    each pixel is converted to a PIXEL GROUP(color,depth,stencil).
    If the pixel group consists of a color, the image data is destined for the color buffer in the framebuffer
    )
    Pixel Transfer (glPixelTransfer, lookup table)

 

 

========================================================

 webgl

 

http://madebyevan.com/
 http://learningwebgl.com/blog/

 

算法

 

http://www.iquilezles.org/www/index.htm

 

 

 

http://glprogramming.com/
 

 

Redbook 9th, GLSL PG 4th

RTR3

 ----------------------------------------------------------------------------

 在rendermonkey下的一些东东:

- (anisotropic.rfx)里

- VS里多数用gl_Position = ftransform();

- (Bounce.rfx) VS里,如果要在物体坐标系下修改顶点信息:

vec3 pos = your_function( gl_Vertex );

gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1.0);

 

 

 

 

 

 

posted on 2010-10-10 13:04  yys  阅读(981)  评论(0编辑  收藏  举报