LearnOpenGL - Depth Testing

文章推薦指數: 80 %
投票人數:10人

The x and y components of gl_FragCoord represent the fragment's screen-space coordinates (with (0,0) being the bottom-left corner). The gl_FragCoord variable ... Ifyou'rerunningAdBlock,pleaseconsiderwhitelistingthissiteifyou'dliketosupportLearnOpenGL;andnoworries,Iwon'tbemadifyoudon't:) IntroductionGettingstartedOpenGLCreatingawindowHelloWindowHelloTriangleShadersTexturesTransformationsCoordinateSystemsCameraReviewLightingColorsBasicLightingMaterialsLightingmapsLightcastersMultiplelightsReviewModelLoadingAssimpMeshModelAdvancedOpenGLDepthtestingStenciltestingBlendingFacecullingFramebuffersCubemapsAdvancedDataAdvancedGLSLGeometryShaderInstancingAntiAliasingAdvancedLightingAdvancedLightingGammaCorrectionShadowsShadowMappingPointShadowsNormalMappingParallaxMappingHDRBloomDeferredShadingSSAOPBRTheoryLightingIBLDiffuseirradianceSpecularIBLInPracticeDebuggingTextRendering2DGameBreakoutSettingupRenderingSpritesLevelsCollisionsBallCollisiondetectionCollisionresolutionParticlesPostprocessingPowerupsAudioRendertextFinalthoughtsGuestArticlesHowtopublish2020OITIntroductionWeightedBlendedSkeletalAnimation2021CSMSceneSceneGraphFrustumCullingTessellationHeightmapTessellationDSACoderepositoryTranslationsAbout BTC 1CLGKgmBSuYJ1nnvDGAepVTKNNDpUjfpRa ETH/ERC20 0x1de59bd9e52521a46309474f8372531533bd7c43 WelcometoOpenGL WelcometotheonlinebookforlearningOpenGL!WhetheryouaretryingtolearnOpenGLforacademicpurposes,topursueacareerorsimplylookingforahobby,thisbookwillteachyouthebasics,theintermediate,andalltheadvancedknowledgeusingmodern(core-profile)OpenGL.TheaimofLearnOpenGListoshowyouallthereistomodernOpenGLinaneasy-to-understandfashionwithclearexamples,whilealsoprovidingausefulreferenceforlaterstudies. Sowhyreadthesechapters? Throughouttheinternettherearethousandsofdocuments,books,andresourcesonlearningOpenGL,however,mostoftheseresourcesareonlyfocusedonOpenGL'simmediatemode(commonlyreferredtoastheoldOpenGL),areincomplete,lackproperdocumentation,orarenotsuitedforyourlearningpreferences.Therefore,myaimistoprovideaplatformthatisbothcompleteandeasytounderstand. Ifyouenjoyreadingcontentthatprovidesstep-by-stepinstructions,clearexamples,andthatwon'tthrowyouinthedeepwithmillionsofdetails,thisbookisprobablyforyou.Thechaptersaimtobeunderstandableforpeoplewithoutanygraphicsprogrammingexperience,butarestillinterestingtoreadforthemoreexperiencedusers.Wealsodiscusspracticalconceptsthat,withsomeaddedcreativity,couldturnyourideasintoreal3Dapplications.Ifalloftheprevioussoundslikesomeonethatcouldbeyou,thenbyallmeans,pleasecontinue. Whatwillyoulearn? ThefocusofthesechaptersareonModernOpenGL.Learning(andusing)modernOpenGLrequiresastrongknowledgeofgraphicsprogrammingandhowOpenGLoperatesunderthehoodtoreallygetthebestofyourexperience.Sowewillstartbydiscussingcoregraphicsaspects,howOpenGLactuallydrawspixelstoyourscreen,andhowwecanleveragethatknowledgetocreatesomefunkylookingeffects. Ontopofthecoreknowledgewewilldiscussmanyusefultechniquesthatyoucanuseforyourapplications,like:traversingascene,createbeautifullighting,loadcustom-madeobjectsfromamodellingprogram,docoolpost-processingtechniques,andmuchmore.WealsofeatureawalkthroughserieswhereweactuallycreateasmallgamebasedonourobtainedOpenGLknowledge,soyouwillreallygetafeelofwhatit'sliketoactuallydographicsprogramming. Wheretostart LearnOpenGLisfree,andwillalwaysbefree,foranyonewhowantstostartwithgraphicsprogramming.Allcontentisavailablehereatthemenutoyourleft.SimplyhittheIntroductionbuttonandyou'rereadytostartyourjourney! LearnOpenGL-printedition Thecontenthasbeenthoroughlyrevised,numeroustimes,overthecourseof7yearstohavefinallybeenaggregatedintoaphysicalcopyavailableforprint.There'sbeenalotofworkputintothephysicalcopy,treatingitasthefirst-classcitizenitis.Boththebookandwebsiteareequals,theircontentisthesame. Aseverythingisfreelyavailableonline,gettingthephysicalcopysupportsmeasanauthor;andlet'snotforgetthatcertaincharmofprintedpaper.ThebookisavailableforsaleonAmazonUS,AmazonUK,Barnes&Noble,andmanyother(online)retailers.Notethatatsomeretailersthebookis ridiculouslyoverpriced;makesureitmatchesroughly$60USdollars,orwaitabituntillthepricesbalancethemselvesout. LearnOpenGL-onlineprintedition-FreePDF I'verevisedthesourcefilesforthephysicalprinteditionandcleanedthemuptobeavailableforonlinereadingaswell,forthosethatpreferitscontentinasingularPDFformat.Usethisformatifyou'dliketoreadduringtravel,writenotes,orprintitoutyourself.Insimilarstyletothewebsite,thisversionis,andwillalwaysbe,freelyavailable. Notethat,similartothephysicalcopy,links/urlsarewrittenoutfullyorasfootnotes,videosshowstaticimages,andthere'snofunctionhoverpop-ups;alltoaccountforthecontentbeingmostlyoffline. Ifyouwanttokeepuptodateonthesiteandbook'sprogressand/orotherLearnOpenGLnews,pleasefollowmeonTwitter. HI



請為這篇文章評分?