Search found 58 matches

by MisterDave
Sat Jan 11, 2014 4:37 am
Forum: Programming Discussion
Topic: 3D Z Clipping For the PVR + OpenGL
Replies: 41
Views: 7574

Re: 3D Z Clipping For the PVR + OpenGL

Very nice. It looks like you are sampling the heightmap at a pretty high resolution too and still getting a good frame rate.
by MisterDave
Tue Dec 31, 2013 4:02 pm
Forum: Programming Discussion
Topic: dreamcast winter terrain and light bloom
Replies: 6
Views: 744

Re: dreamcast winter terrain and light bloom

Hi PH3NOM, that's right. Thanks for the support. My field of vision clipping is a little too aggressive, but I need to increase the angle a bit, but using the fipr dot product makes things nice and fast. It is using KGL with a modification that I made to allow rendering to a texture. If you are inte...
by MisterDave
Fri Dec 20, 2013 7:59 am
Forum: Programming Discussion
Topic: dreamcast armc cpu uses?
Replies: 32
Views: 3033

Re: dreamcast armc cpu uses?

Exciting stuff. I love the bare-bones approach to programming on the DC's ARM CPU, so it's nice to see examples of it being used going all the way back to Dan Potter's S3M player.
by MisterDave
Fri Nov 22, 2013 1:04 pm
Forum: Programming Discussion
Topic: Query about implementing render to texture in KGL
Replies: 1
Views: 658

Re: Query about implementing render to texture in KGL

I have managed to develop a workaround for render-to-texture in KGL through modification to glkos.c and am posting a little code snippet if it is useful to anyone looking to use this feature. This is nowhere near OpenGL compliant with the way that it works, but should be quite similar to the way tha...
by MisterDave
Sun Sep 29, 2013 8:01 am
Forum: Programming Discussion
Topic: Query about implementing render to texture in KGL
Replies: 1
Views: 658

Query about implementing render to texture in KGL

Hi guys I am currently having a go at implementing render-to-texture in KGL. Whilst Parallax has been useful to learn, the degree of portability that KGL gives for parts of the GL API seems attractive and I'd quite like to be able to add the render to texture effects to my existing GL engine. To ach...
by MisterDave
Thu Aug 29, 2013 11:02 am
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Thanks PH3NOM for the link to the Nvidia material - It will do me a lot of good to get to grips with the chapter as a matter of principle then work properly through your code and notes.  The vertices in my case have been transformed using Parallax. I get the impression that Parallax is typically use...
by MisterDave
Tue Aug 13, 2013 3:38 pm
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

@PH3NOM A quick question while looking through your code. I was just wondering how you deal with the camera transformation matrix? My thought is that in order to determine whether a vertex will pass behind the camera then the clipping algorithm would have to reverse everything pushed onto the intern...
by MisterDave
Fri Aug 09, 2013 2:47 am
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

@PH3NOM Regarding the clipping I cheated a bit by basing the geometry on a tilemap and clipping based on the FOV. I am currently rewriting this to pull in geometry from Blender, etc so I will need to do proper clipping. I really need to get more involved with your clipping code, but just have a quic...
by MisterDave
Wed Aug 07, 2013 3:16 pm
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Just a quick screenshot of what I have working so far. I'm looking at putting together a small demo of a player walking in and out of dark environments into a brightly lit area fairly soon and make the code public. http://dave-webster.com/images/screenshots/dcbloom.png TapamN, thanks for the advice ...
by MisterDave
Sun Aug 04, 2013 2:35 pm
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Thanks guys. Ah .. I should have checked the Parallax documentation more closely as I had assumed that it handled the Z clipping just like KGL. Thanks for the code sample - I had taken this for granted in KGL.
by MisterDave
Sun Aug 04, 2013 10:02 am
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Cool, I'd be happy to do that. The effect works fairly well, I'm just wrestling with a bug that seems to make anything that moves behind the camera repeat in an endless corridor in front of the camera and trying to determine what is causing it. It seems to be in the Parallax version of nehe lesson 1...
by MisterDave
Sun Aug 04, 2013 3:01 am
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Thanks for looking into this so quickly BlueCrab and for creating a patch. Fingers crossed I should be able to get my bloom filter complete now. If this works as expected then I would be happy to share my code in the case that anyone else wants to reuse it as an example.
by MisterDave
Sat Aug 03, 2013 10:44 am
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Thanks for the advice anyways. I need to do a bit more testing to determine why this is happening. If it's something in KOS rather than my own code I'll see if I can fix it and make a patch.
by MisterDave
Sat Aug 03, 2013 2:36 am
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Apologies if that didn't come across too clear. I have looked through both the pvr render-to-texture and lesson35 examples which have given me enough information to put together an example to render a scene to a texture then to draw a cube with this texture on the sides. This seems to work fine. The...
by MisterDave
Fri Aug 02, 2013 7:32 pm
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Thanks for the help. I seem to have more or less the effect that I was looking for by using alpha blending, however, when rendering to textures before blending I seem to have hit on either a bug in the hardware or something that I have misunderstood. From what I can tell pvr_scene_begin_txr(...) can...
by MisterDave
Fri Aug 02, 2013 3:03 pm
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Re: Reading texture from PVR back into SH-4 RAM

Thanks BlueCrab. I wasn't sure if the object at the end of the pvr_ptr_t was readable and manipulatable, so thanks for clarifying that for me. I noticed on the Parallax tutorial 35 that there was an example of ortho rendering, which helps to deal with scaling down and texture then picking it out and...
by MisterDave
Wed Jul 31, 2013 2:28 pm
Forum: Programming Discussion
Topic: Reading texture from PVR back into SH-4 RAM
Replies: 29
Views: 2577

Reading texture from PVR back into SH-4 RAM

Just a quick question about textures in the PVR RAM. Do you know if it is possible to be able to read these back into SH-4 RAM and possibly untwiddle into a raw form for modification? My thought behind this is to be able to perform a blurring effect to achieve a light bloom. I have had a look at the...
by MisterDave
Sun Apr 21, 2013 11:53 am
Forum: Programming Discussion
Topic: dreamcast armc cpu uses?
Replies: 32
Views: 3033

Re: dreamcast armc cpu uses?

Thanks Ayla for the link to your ARM OS code. So far I have been trying to write my ARM code based on Dan Potter's s3mplay.c example which is as low level as you can get (no external libraries). Having a mechanism to call functions on the SH4 from the ARM is really nice, particularly printf for debu...