Author Topic: Shader's Hell !  (Read 3789 times)

Offline MoonHelp

  • byte
  • *
  • Posts: 4
    • View Profile
Shader's Hell !
« on: February 11, 2012, 09:08:54 pm »
Shader's Hell...

Hi, Everybody !! (Hello Egon) [I read your forum everyday]

My test : The HelloShader Eclipse data

I'am playing with JPCT-AE and I tried some test.

I keep the GLSLShader Method on my cube.

I removed all shaders files into the jar
and I expected an Eclipse bug : but nothing wrong...
My scene is the same. (nothing change).

Could you tell me why ?

Friendly

Olivier (France)
Graphic Designer (print publishing) ==>15 years skill BUT JAVA noob
Bad english inside ? sorry !! : -) I'am French  and I don't speak every days your language !
Rights ?
« Last Edit: February 11, 2012, 09:25:52 pm by MoonHelp »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Shader's Hell !
« Reply #1 on: February 11, 2012, 09:33:55 pm »
I don't get the problem...you've removed the shader files and expected the result to be wrong but it wasn't? Or was is wrong before and nothing changed after removing the files?

Offline MoonHelp

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Shader's Hell !
« Reply #2 on: February 13, 2012, 11:21:26 am »
Hi,Egon !

I mean :
My scene was ok at the begining !
A spinning cube with a grey jpeg bitmap texture

My test :
I deleted all the code in these 2 files (now I have 2 empty files)  :

res/raw/fragmentshader_offset.glsl
res/raw/vertexshader_offset.glsl


and I unpacked the jar > deleted  all the 16 shaders file .src
I repacked the jar

I updated the eclipse project with this new jar without .src files
and lauched again...

My scene is identical : my 3D object seems a bit more opaque...

My question : now what is the process who's support the non existing GLSLshaders informations
and return a default value ?

Merci
Olivier



« Last Edit: February 13, 2012, 02:14:37 pm by MoonHelp »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Shader's Hell !
« Reply #3 on: February 13, 2012, 12:02:42 pm »
The shader files are only needed for OpenGL ES2.0. Are you sure that you are using this?

Offline MoonHelp

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Shader's Hell !
« Reply #4 on: February 13, 2012, 02:02:41 pm »
OK

I loaded a new instance of the HelloShader eclipse project
and deleted all code in the 2 shaders files (res/raw) and copy/paste
code from the Shaders Generator Devel apk (Android Market)

And now I have a beautiful  ERROR: Missing attribute 'position' in vertex shader
OK OPENGL ES2.0 is now enable !

BTW : why shaders devel generate wrong code ? (I imported the same 3D object (a simply cube) in shader devel)

Thank you


« Last Edit: February 13, 2012, 02:04:15 pm by MoonHelp »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Shader's Hell !
« Reply #5 on: February 13, 2012, 09:28:48 pm »
It doesn't generate wrong code  (i assume...)...it's just that you have to follow some naming conventions in your shaders for uniforms and attributes to allow jPCT-AE to inject its data into your shader. Those are documented in the GLSLShader class: http://www.jpct.net/jpct-ae/doc/com/threed/jpct/GLSLShader.html

Offline MoonHelp

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Shader's Hell !
« Reply #6 on: February 14, 2012, 02:13:38 pm »
Ok
I will try.

Merci

« Last Edit: February 14, 2012, 02:23:22 pm by MoonHelp »