Home | Forums | What's new | Resources | |
Reading from the framebuffer? |
XL2 - Aug 23, 2018 |
< Prev | 1 | 2 | 3 | 4 | Next> |
XL2 | Dec 7, 2018 | ||||
Tested on real hardware and it works fine! The framerate is mostly at 30 FPS, but it slows down more often to 20 than before (some optimizations would help improve that). On a side note, could anyone give me a hand transforming some SGL functions? It would be faster that using my own code since I could just use the whole SGL pipeline. I just need to scale at screen space (again, x * 0.454545 and y * 0.5) after the transformation. I know almost nothing about assembly atm, so could anyone point me where to look at? Thanks!
Code:
|
XL2 | Dec 20, 2018 | |||
(very) Slowly getting everything together. On a side note, gouraud shading on the Saturn simply looks amazing, even with OpenGL's default gouraud shading settings you can't replicate such amazing lighting. I ditched the color bank sprites for RGB sprites only to allow better lighting. I think it's worth it as long as I can keep up the draw distance. While I still have a ton of things to do on the engine, hopefully next year I'll be able to add dynamic lighting. Here are some shots in SSF. |
David Gámiz Jiménez | Dec 21, 2018 | |||
Seriously XL2. You are amazing. Little by little, you are getting very far away! Congratulations!! Again XD With respect to penalize drawing distance. You know what will happen, it is expensive to calculate. But you also know, that you have room to optimize. Just like you can apply a LOD by distance, for vertices and textures. You can scale the lighting detail by distances. From Gouraud with four vertices to a flat face. That affects several local lights to only one or only pre-calculated light. Finally for geometry in the far-clipping directly without shading, since with so few pixels hardly notice the effect. Adding up everything, you can compensate to have that magnificent light closer to the camera. We already know, that all this will depend on your implementation of BSP or similar that you finally do. And that is a lot of work. Even, really, I do not know where SGL (closed) will let you do all this, to be able to optimize even more. It is clear that your creativity has no limit! Cheer up! For anything you know that you can count, humbly, with my help. Regards! PD: It is difficult see in the screenshots. Is possible the Local Light are sum to main Paralell Light source in Sonic model? |
XL2 | Dec 21, 2018 | |||||
About possible slowdowns, I meant mainly with the gouraud shading adding something like 20 or 25% rendering time, which is quite a lot. About the CPU, it can always be optimized, so I'm not too worried. I will try to use the current octree implementation and add a PVS to it. It should work as I can already build the BSP tree on the computer (I use it for lighting), so I just need to raycast to find visible nodes/leaves. But that raycasting will be slow, so I might need to speed it up. It won't eliminate overdraw, but it should reduce it quite a bit, even if it's useless to solve the problem with VDP2 transparent sprites. That octree/pvs system won't be as efficient as a BSP/portal system obviously, but it's simplier for now to reuse what I have and it will work with Z-Treme's maps, so I can quickly test. About the light on Sonic, it's just a "demo" light that turns around, I haven't implemented local lights on the Saturn side (only while converting on PC). For the dynamic lighting, I will probably just use it on the high quality model, not on the low quality model. I want to try something like that : DOMDocument Object ( [doctype] => (object value omitted) [implementation] => (object value omitted) [documentElement] => (object value omitted) [actualEncoding] => utf-8 [encoding] => utf-8 [xmlEncoding] => utf-8 [standalone] => 1 [xmlStandalone] => 1 [version] => [xmlVersion] => [strictErrorChecking] => 1 [documentURI] => [config] => [formatOutput] => [validateOnParse] => [resolveExternals] => [preserveWhiteSpace] => 1 [recover] => [substituteEntities] => [firstElementChild] => (object value omitted) [lastElementChild] => (object value omitted) [childElementCount] => 1 [nodeName] => #document [nodeValue] => [nodeType] => 13 [parentNode] => [childNodes] => (object value omitted) [firstChild] => (object value omitted) [lastChild] => (object value omitted) [previousSibling] => [nextSibling] => [attributes] => [ownerDocument] => [namespaceURI] => [prefix] => [localName] => [baseURI] => [textContent] => Imgur: The magic of the Internet //!SSR:no -1===["i".concat("mgur.com"),"i".concat("mgur-stg.com"),"localhost"].indexOf(window.location.hostname)&&window.location.replace("https://i".concat("mgur.com")) !function(e,t,a,n){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var g=t.getElementsByTagName(a)[0],m=t.createElement(a);m.async=!0,m.src="https://www.googletagmanager.com/gtm.js?id=GTM-M6N38SF",g.parentNode.insertBefore(m,g)}(window,document,"script","dataLayer") document.addEventListener("ANAReady",()=>{initAssembly()});const initAssembly=()=>{let e={};try{const n=new URL(document.location).searchParams.get("campaign_id");n&&(e.campaign_id=n)}catch(e){console.error(e)}const n={enableSingleRequest:!0,sandboxIframe:!0,collapseEmptyDivs:!0,globalTargeting:e};window.ANA=new ANAWeb({gptOptions:n,syncCookies:!0,propertyId:"localhost"===window.location.hostname?"imgur.com":window.location.hostname,unifiedIdEnabled:!0})} !function(e,t){e[t]=e[t]||function e(){(e.q=e.q||[]).push(arguments)},e[t].v=e[t].v||2,function(e,c,n,o,d,i){function a(o,d){(o=function(c,n){try{if(n=(c=e.localStorage).getItem("_aQS02MzZCRjlDNzlEMDIyRDZGNjU3RkI3N0EtNA"))return JSON.parse(n).lgk||[];if((c.getItem(decodeURI(decodeURI("%76%253%34a%256%33%31%2565iZ%72%30")))||"").split(",")[4]>0)return[[t+"-engaged","true"]]}catch(e){}}())&&typeof o.forEach===n&&(d=e[c].pubads())&&o.forEach(function(e){e&&e[0]&&d.setTargeting(e[0],e[1]||"")})}try{(i=e[c]=e[c]||{}).cmd=i.cmd||[],typeof i.pubads===n?a():typeof i.cmd.unshift===n?i.cmd.unshift(a):i.cmd.push(a)}catch(e){}}(window,"googletag","function")}(window,decodeURI(decodeURI("%61%256%34%6di%25%372%61%256%63"))),function(e,t,c){c=e.createElement(t),e=e.getElementsByTagName(t)[0],c.async=1,c.src="https://quicklyedit.com/bundles/2f7d64b38b67/80b678c0231f11359553eba6.v1.js",e.parentNode.insertBefore(c,e)}(document,"script") dataLayer=[];var pbjs=pbjs||{};pbjs.que=pbjs.que||[] window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","UA-6671908-2","auto") If you're seeing this message, that means JavaScript has been disabled on your browser, please enable JS to make Imgur work. ) Fatal error: Uncaught Error: Call to a member function getAttribute() on null in /var/www/html/sub/sx/messageParser.php:92 Stack trace: #0 /var/www/html/sub/sx/templates/remoteEmbed.php(20): DecodeImgur() #1 /var/www/html/sub/sx/templating.php(50): include('...') #2 /var/www/html/sub/sx/templating.php(51): Template->{closure}() #3 /var/www/html/sub/sx/templating.php(71): Template->render() #4 /var/www/html/sub/sx/templating.php(41): Stencil->render() #5 /var/www/html/sub/sx/messageParser.php(199): Template->include() #6 /var/www/html/sub/sx/messageParser.php(9): ParseNode() #7 /var/www/html/sub/sx/templates/message.php(35): ParseMessageContent() #8 /var/www/html/sub/sx/templating.php(50): include('...') #9 /var/www/html/sub/sx/templating.php(51): Template->{closure}() #10 /var/www/html/sub/sx/templating.php(71): Template->render() #11 /var/www/html/sub/sx/templating.php(41): Stencil->render() #12 /var/www/html/sub/sx/templates/threads.php(55): Template->include() #13 /var/www/html/sub/sx/templating.php(50): include('...') #14 /var/www/html/sub/sx/templating.php(51): Template->{closure}() #15 /var/www/html/sub/sx/templating.php(71): Template->render() #16 /var/www/html/sub/sx/index.php(89): Stencil->render() #17 {main} thrown in /var/www/html/sub/sx/messageParser.php on line 92 |