Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
153 user(s) are online (80 user(s) are browsing Forums)

Members: 0
Guests: 153

more...

Headlines

Forum Index


Board index » All Posts (thellier)




Re: DevilutionX - Diablo 1
Not too shy to talk
Not too shy to talk


@white
Perhaps related to lack of Compositing in WinUAE: give a try to my aminet patchcompositetags

Go to top


Re: Porting apitrace
Not too shy to talk
Not too shy to talk


Have you tried to compile from RAM: ? Perhaps GCC got problems with some file systems ?

Go to top


Re: type of crash: alignment exeption, how to fix ?
Not too shy to talk
Not too shy to talk


Sorry I dont have a recent enough Nova nor GL-ES to test it...

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


Does the 2 dbo sizes are différent and are what we expects ? I mean a size for 2 matrices and fog values for vert and a size for only fog values for frag ?

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


You and I and Daytona agree : it should be done this way (2 dbo + 2 dbosetbuffertags

But does it really happen ?

Can we track down the calls to dbosetbuffertags ?

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


I was meaning we need to have to 2 calls to DBOSetBufferTags
1) to set the uniforms for vert shader with a dbo (=uniformes data) that contain the 2 matrices + the fog values
2) ... frag ... With a dbo that contain only the fog values so with a smaller size

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


>struct and use fog variables without will be harder
No because in fact it is the same thing
I mean
struct _gl4es_FogParameters {
lowp vec4 color;
mediump float density;
mediump float start;
mediump float end;
mediump float scale;
};
just say that there a 8 floats at this offset inside the uniforms data
replacing it with
lowp vec4 color;
mediump float density;
mediump float start;
mediump float end;
mediump float scale;
change nothing to the way uniforms are used (same data same usage)

Anyway as you said it seems the problem is transmitting the uniforms value from vert shader to frag shader

Have you noted that vert shader and frag shader dont use the same uniforms variables ?

I mean there is at uniforms' start
uniform highp mat4 _gl4es_ModelViewMatrix;
uniform highp mat4 _gl4es_ModelViewProjectionMatrix;
in vert shader not in frag

It is allowed to have differents uniforms for a vert and frag shader BUUT does the prog that use those shader REALLY change the uniforms when calling frag shader ?












Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


No i was meaning: fully remove the struct container for fog and just let the the fog variables as is

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


2) gl_FragColor=_gl4es_Fog.color;

all black so the fog color is not transmited = perhaps using a struct for fog params is wrong with Nova

So transmit fog params as basic uniforms in both frag & vertex shader

uniform vec4 Fog_color;
uniform float Fog_density;
uniform float Fog_start;
uniform float Fog_end;
uniform float Fog_scale;

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


>And there is no point to check 2) and 3)
I dont agree: perhaps _gl4es_Fog.density & _gl4es_Fog.color are not correctly transmited to BOTH shaders but you can only display it with frag shader with gl_FragColor=_gl4es_Fog.color;

BTW are you sure the "mediump" are needed in struct _gl4es_FogParameters ?

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


Hello

1) Have you tried to let the Vertex shader unchanged and just let something like that in the Frag shader's main()

gl_FragColor=vec4(FogF,FogF,FogF,1.0);

So we will see if vertex shader generate a good FogF value

2) then try
gl_FragColor=_gl4es_Fog.color;
to see if the uniforms' fog colour is really send to the shaders

3) then try
gl_FragColor=vec4( _gl4es_Fog.density ,_gl4es_Fog.density ,_gl4es_Fog.density ,1.0);
to see if the uniforms' fog density is really send to the shaders

Note: putting the value to debug in gl_FragColor is a good way to find a shader problem as it can be read in the resulting picture in the RGB pixel value

Go to top


Re: type of crash: alignment exeption, how to fix ?
Not too shy to talk
Not too shy to talk


sorry for not answering but I was a little sick and feverish those days and I did not have the courage to read code

Certainly there are some typos in my code

> in the same place
Yes we should better use an aligned structure as destination
something like
[...]
struct AlignedTriangle *tri2=triangles2;
[...]
tri2->VertexIndices[j] = GetWord(&(tri->VertexIndices[j]));

tri2->VertexNormals[j][0] = GetFloat(&(tri->VertexNormals[j][0]));
[...]
tri2++;

>GetWord
is also used for reordering the u16 values

Go to top


Re: type of crash: alignment exeption, how to fix ?
Not too shy to talk
Not too shy to talk


fstruct MS3DTriangle
{
u16 Flags;
u16 VertexIndices[3];
float VertexNormals[3][3];
float S[3], T[3];
u8 SmoothingGroup;
u8 GroupIndex;
};
*/==========================================*/
static inline float GetFloat(void *ptr)
{
register union {
u8 u[4];
float f;
} tmp;

#ifdef __BIG_ENDIAN__
tmp.u[0] = ((u8 *)ptr)[3];
tmp.u[1] = ((u8 *)ptr)[2];
tmp.u[2] = ((u8 *)ptr)[1];
tmp.u[3] = ((u8 *)ptr)[0];
#else
tmp.f = *(float*)ptr;
#endif
return tmp.f;
}
*/==========================================*/
static inline float GetWord(void *ptr)
{
register union {
u8 u[4];
u16 w;
} tmp;

#ifdef __BIG_ENDIAN__
tmp.u[0] = ((u8 *)ptr)[1];
tmp.u[1] = ((u8 *)ptr)[0];
#else
tmp.w = *(u16 *)ptr;
#endif
return tmp.w;
}
*/==========================================*/

// I give only the important part :

register struct MS3DTriangle *tri=triangles;

#ifdef __BIG_ENDIAN__
for (u16 n=0; n<numTriangles; ++n)
{
tri->Flags = GetWord(&(tri->Flags));
for (u16 j=0; j<3; ++j)
{
tri->VertexIndices[j] = GetWord(&(tri->VertexIndices[j]));

tri->VertexNormals[j][0] = GetFloat(&(tri->VertexNormals[j][0]));
tri->VertexNormals[j][1] = GetFloat(&(tri->VertexNormals[j][1]));
tri->VertexNormals[j][2] = - GetFloat(&(tri->VertexNormals[j][2]));

tri->S[j] = GetFloat(&(tri->S[j]));
tri->T[j] = GetFloat(&(tri->T[j]));
}
tri++;
}
#endif

Go to top


Re: type of crash: alignment exeption, how to fix ?
Not too shy to talk
Not too shy to talk


Your code looks difficult to read as you treat readings on a byte per byte basis with all those indiced pVPtr2[] access

You should better encapsulate your "read/reorder a float" in a single inline like Salass did :

static inline float GetFloat(void *ptr)
{
register union {
u8 u[4];
float f;
} tmp;

#ifdef __BIG_ENDIAN__
tmp.u[0] = ((u8 *)ptr)[3];
tmp.u[1] = ((u8 *)ptr)[2];
tmp.u[2] = ((u8 *)ptr)[1];
tmp.u[3] = ((u8 *)ptr)[0];
#else
tmp.f = *(float*)ptr;
#endif
return tmp.f;
}

of course it will need a triangle structure for read and another for writing the reordered floats but anyway the code will become more readable/maintainable

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


@Daytona675x

I explained it badly I should have called the variable VertexSize not VBOsize : but we agree
[ For Wazp3D57 I have encapsulated all those VBO functions to more simple functions so I no more use them...]

I was thinking that "recasting" on the fly a VBO created with 3 "fields" to a VBO with 40 "fields" may be possible (after all Nova works so strangely so it may not have check the "fields" scount) as long as the global VBOsize stay the same (160). It may have permit to not change the VertexSize to a multiple of 3
but if it dont works it dont works...

Go to top


Re: Streaming twitch.tv on AmigaOS 4.1
Not too shy to talk
Not too shy to talk


Hello

Nothing related but your program make me think about YoutubeMp3 that allow to get MP3 from YouTube video clips
Exemple:
https://youtubemp3.today/?url=https%3A ... 2Fwatch%3Fv%3DMtMQsZn8GbY

Would be nice to have an Amiga tool that make a search for youtube clips for (say) "Michael Jackson" then give you a list of songs ready to download/play as MP3



Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


@Daytona675x


If I understood well this should works too, no?

- create VBO with N arrays
- define VBOsize as VBO byte size
- if you want to switch to fast endian-conv-free data transfer then do
for(uint32 i=0;i<VBOsize ;++i) VBOSetArray(vbo_handle,i,W3DNEF_UINT8,FALSE,1,1,i,1);

Edit: VBOsize I mean per line of the array
Exemple
3 arrays:
xyz
uvw
rgba

VBOsize=(3+3+4)*4=40

So no need to have a multiple of 3 can keep 40


Edited by thellier on 2019/9/20 13:28:47
Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


@kas1e

You cant blame Hans to not fix immediately Nova: after all we dont know about his life and perhaps he have more urgent/important personnal things to do in his life than fixing a hobby computer program.

Usually the answer is "will be done in a future release" for
subcontractor
or for employee "I will take care of it as soon as I will have time" and you put the paper up to a big stack of folders meaning " but I have so much to do..."

Dont blame him for not saying such bullshits


Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


@Daytona675x
Sorry, You are right I only read until page 34 :-/ so I missed your last explanations
I am not accoutumed to have a coding subject produce so much answers in so few time

> b) that vertex data is frequently changing
So for any minigl to nova (or warp3d to nova) wrapper it will make sense

Go to top


Re: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
Not too shy to talk
Not too shy to talk


>The only thing that helps is to create a simple 1 array VBO in the first place.

?? Please, explain more.
Do you mean a simple array of floats declared as W3DNEF_NONE + uint8 ?
Because later on your text you say it dont works
but say "we still have a potential up-to-factor-4"

I mean do you really obtained x4 speed up ? or is it theory ?

Go to top



TopTop
« 1 (2) 3 4 5 ... 14 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project