Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Pixel Shader example for jogl wanted...  (Read 3171 times)
0 Members and 1 Guest are viewing this topic.
Offline hejfelix

Junior Duke





« Posted 2008-10-27 14:14:54 »

I need an example pixel shader implementation for jogl(or ogl in c or c++).

It needs to use gl_fragment_program, since I want it to run on old machines with old graphics cards.

Any fullscreen effect shaders should be ok, 2xsai,antialias,eagle <- things like that. Bloom would be nice too.

Please help, I really wanna see shaders come into my jogl game.

<i8b4uUnderground> d-_-b
<BonyNoMore> how u make that inverted b?
<BonyNoMore> wait
<BonyNoMore> never mind
Offline lhkbob

JGO Knight


Medals: 32



« Reply #1 - Posted 2008-10-27 15:33:20 »

Do you want the code to setup and use pixel shaders, or the actual shader code written in Cg, glsl, etc. (or older varieties since you wanted gl_fragment_program)?

Offline hejfelix

Junior Duke





« Reply #2 - Posted 2008-10-27 17:38:24 »

Oh sorry, maybe I wasnt clear. What I need is the code to set up and use a pixel shader, possibly accompanied with some random shader to test it with. Smiley Thanks

<i8b4uUnderground> d-_-b
<BonyNoMore> how u make that inverted b?
<BonyNoMore> wait
<BonyNoMore> never mind
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bienator

Senior Duke




OutOfCoffeeException


« Reply #3 - Posted 2008-10-27 18:42:25 »

something like this?
https://netbeans-opengl-pack.dev.java.net/source/browse/netbeans-opengl-pack/trunk/jogl-utils/src/com/mbien/engine/glsl/GLSLShader.java?rev=476&view=markup
https://netbeans-opengl-pack.dev.java.net/source/browse/netbeans-opengl-pack/trunk/jogl-utils/src/com/mbien/engine/glsl/GLSLProgram.java?rev=476&view=markup

btw, the opengl pack ships with an GLSL shader editor (but no glsl samples yet... but you now... on the TODO list)

Offline hejfelix

Junior Duke





« Reply #4 - Posted 2008-10-27 21:01:12 »


Yes something like that. I would really like something with a main-method, so I could test it and see that it is actually what I need. It seems a bit tricky because I have no experience in this field and am new to OpenGL. Also, I am looking for somethin fast/easy, so if someone can implement one of those in some test example, or show me some runnable example, it would be nice Smiley

<i8b4uUnderground> d-_-b
<BonyNoMore> how u make that inverted b?
<BonyNoMore> wait
<BonyNoMore> never mind
Offline emzic

Senior Duke





« Reply #5 - Posted 2008-10-28 08:52:43 »

btw, the opengl pack ships with an GLSL shader editor (but no glsl samples yet... but you now... on the TODO list)

where in the opengl pack can this glsl editor be found? i looked through the examples and demos, but couldnt find it. thanks!

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Offline bienator

Senior Duke




OutOfCoffeeException


« Reply #6 - Posted 2008-10-28 18:15:43 »

you already installed the pack, right? In this case you don't have to to anything special to use the GLSL editor just open a shader file in the same way you would open a java or xml file. (there are also shader templates available if you want to create a new file for fragment, vertex and geometry shaders).

sidenote:
the JOGL project webstart support only works for NB 6.0 and  6.1. Next version of the pack will be NB 6.5 compatible but we will probably drop 6.1 and 6.0 support.

Offline Therion__

Junior Duke





« Reply #7 - Posted 2008-10-29 09:01:56 »

the shader designer tool from opengl.org looks very cool

i am also like to see how to implement the

envmap.vert & envmap.frag files for example  to an simple

netbeans/opengl/jogl sample to see and learn


in the netbeans plugins there are the jogl shader examples
but in a very complicate structure


Offline emzic

Senior Duke





« Reply #8 - Posted 2008-10-29 17:31:20 »

you already installed the pack, right? In this case you don't have to to anything special to use the GLSL editor just open a shader file in the same way you would open a java or xml file.

ok thanks! now when i have the file open in netbeans, how do i get to that editor?

or maybe this is a misunderstanding? what exactly is meant by "editor"? i was thinking of something like an interactive shader builder like nvidia's fxcomposer?

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Offline cylab

JGO Ninja


Medals: 52



« Reply #9 - Posted 2008-10-29 17:58:16 »

This is on the TODO list (for quite some time...), but right now it's just a syntax colorizing, error checking text editor with code completion.

Mathias - I Know What [you] Did Last Summer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bienator

Senior Duke




OutOfCoffeeException


« Reply #10 - Posted 2008-10-29 18:08:44 »

+ code folding, navigator and compiler integration (e.g for error annotations) in other words an "editor" but not yet a designer  Grin

in the netbeans plugins there are the jogl shader examples
but in a very complicate structure
if you are looking for some sample shaders this might help:
http://www.3dshaders.com/home/

rendermonkey and the "ShaderDesigner" (I think this one is no more under active development) have also several examples.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (41 views)
2014-10-17 03:59:02

Norakomi (33 views)
2014-10-16 15:22:06

Norakomi (26 views)
2014-10-16 15:20:20

lcass (30 views)
2014-10-15 16:18:58

TehJavaDev (59 views)
2014-10-14 00:39:48

TehJavaDev (60 views)
2014-10-14 00:35:47

TehJavaDev (50 views)
2014-10-14 00:32:37

BurntPizza (66 views)
2014-10-11 23:24:42

BurntPizza (38 views)
2014-10-11 23:10:45

BurntPizza (80 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!