yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
0f68de95b
master
1<!DOCTYPE html> 2< html lang = "{{ site.lang | default: " en-US "}} "> 3 4< head > 5< meta charset = 'utf-8' > 6< meta name = "viewport" content = "width=device-width, initial-scale=1" > 7< meta http-equiv = "X-UA-Compatible" content = "IE=edge" > 8< link rel = "stylesheet" href = "{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}" > 9< link rel = "stylesheet" type = "text/css" href = "{{ '/assets/css/print.css' | relative_url }}" media = "print" > 10< script async src = "https://www.googletagmanager.com/gtag/js?id=G-TMTZVLLMBP" ></ script > 11< script > 12window . dataLayer = window . dataLayer || [] ; 13function gtag (){ dataLayer . push ( arguments ) ; } 14gtag ( 'js' , new Date ()) ; 15gtag ( 'config' , 'G-TMTZVLLMBP' ) ; 16</ script > 17<!--[if lt IE 9]> 18<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> 19<![endif]--> 20< style > 21# centeringDiv { 22margin : auto; 23max-width : 1200 px ; 24} 25# navDiv 26{ 27display : block; 28box-sizing : border-box; 29padding-top : 5 px ; 30padding-bottom : 5 px ; 31border-bottom-width : 3 px ; 32border-bottom-style : solid; 33border-bottom-color : #F0F0F0 ; 34} 35# navDiv nav 36{ 37float : left; 38} 39# navDiv :: after { 40content : "" ; 41clear : both; 42display : table; 43} 44# navDiv nav li :: after 45{ 46content : "/" ; 47padding-left : 10 px ; 48padding-right : 0 px ; 49color : #808080 ; 50} 51# navDiv nav li 52{ 53display : inline; 54padding-left : 10 px ; 55padding-right : 0 px ; 56} 57# tocColumn { 58width : 350 px ; 59position : fixed; 60overflow-y : auto; 61box-sizing : border-box; 62display : block; 63} 64 65# tocInner { 66padding : 20 px ; 67} 68 69# rightColumn { 70padding-left : 390 px ; 71padding-right : 40 px ; 72padding-top : 20 px ; 73} 74 75. toc_root_list { 76list-style-type : none; 77list-style-position : outside; 78background-color : initial; 79padding-left : 0 px ; 80} 81. toc_list { 82padding-left : 16 px ; 83background-color : initial; 84list-style-type : none; 85margin-bottom : 0 px ; 86} 87. toc_item { 88cursor : pointer; 89user-select : none; 90list-style-type : none; 91padding-left : 0 px ; 92padding-top : 5 px ; 93} 94. toc_item_expanded :: before { 95content : " \25be " ; 96cursor : pointer; 97} 98. toc_item_collapsed :: before { 99content : " \25b8 " ; 100cursor : pointer; 101} 102. toc_item_leaf { 103padding-left : 14 px ; 104cursor : pointer; 105list-style-type : none; 106} 107. toc_span : hover 108{ 109color : #d5000d ; 110} 111. tocIcon 112{ 113vertical-align : -2.5 px ; 114} 115. editButton 116{ 117float : right; 118margin-right : 10 px ; 119color : #808080 ; 120} 121. editIcon 122{ 123fill : currentColor ; 124vertical-align : text-top; 125} 126# btnToggleTOC { 127display : none; 128width : fit-content; 129margin-left : 10 px ; 130margin-top : 10 px ; 131padding : 10 px ; 132border-style : solid; 133border-color : #808080 ; 134border-width : 1 px ; 135background-color : #E8E8E8 ; 136} 137# btnToggleTOC : hover { 138background-color : #F0F0E8 ; 139} 140# btnToggleTOC : active { 141background-color : #D4D4D4 ; 142} 143@media screenand ( max-width : 900 px ) { 144# tocColumn { 145width : 300 px ; 146display : block; 147box-sizing : border-box; 148} 149# rightColumn { 150padding-left : 320 px ; 151padding-right : 20 px ; 152} 153} 154 155@media screenand ( max-width : 700 px ) { 156# tocColumn { 157width : 100 % ; 158position : static; 159display : none; 160border-right-style : none; 161box-sizing : content-box; 162} 163# tocInner { 164padding : 10 px ; 165} 166# rightColumn { 167padding-left : 10 px ; 168padding-right : 10 px ; 169} 170# centeringDiv { 171padding-left : 0 px ; 172} 173# btnToggleTOC { 174display : block; 175} 176} 177</ style > 178 {% seo %} 179</ head > 180 181< body > 182< div id = "centeringDiv" > 183< div id = "navDiv" > 184 {% include_relative nav.html %} 185< a class = "editButton" title = "Edit this page" href = "https://github.com/{{ site.github.repository_nwo }}/edit/master/docs/{{ page.path }}" > 186< svg class = "editIcon" height = "16" viewBox = "0 0 16 16" version = "1.1" width = "16" aria-hidden = "true" > 187< path fill-rule = "evenodd" 188d = "M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z" > 189</ path > 190</ svg > 191</ a > 192</ div > 193< button id = "btnToggleTOC" onclick = " toggleTOC () " > 194< svg height = "16" class = "tocIcon" viewBox = "0 0 16 16" version = "1.1" width = "16" aria-hidden = "true" > 195< path fill-rule = "evenodd" 196d = "M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z" > 197</ path > 198</ svg > 199 Table of Contents</ button > 200< div id = "tocColumn" > 201< div id = "tocInner" > 202 {% include_relative toc.html %} 203</ div > 204</ div > 205< div id = "rightColumn" > 206< section id = "main_content" > 207 {% include anchor_headings.html html=content anchorBody="" %} 208</ section > 209< a href = "javascript:;" id = "_content_end_" ></ a > 210< footer > 211 {% if site.github.is_project_page %} 212 {{ site.title | default: site.github.repository_name }} is maintained by< a 213href = "{{ site.github.owner_url }}" > {{ site.github.owner_name }}</ a >< br > 214 {% endif %} 215 This page was generated by< a href = "https://pages.github.com" > GitHub Pages</ a > . 216</ footer > 217</ div > 218</ div > 219< script > 220// Fix for IE. Make sure String has `startsWith` method. 221if ( ! String . prototype . startsWith ) 222{ 223String . prototype . startsWith = function ( searchString , position ) { 224position = position || 0 ; 225return this . indexOf ( searchString , position ) === position ; 226} ; 227} 228 229var tocColumn = document . getElementById ( "tocColumn" ) ; 230var rightColumn = document . getElementById ( "rightColumn" ) ; 231function updateScroll () 232{ 233if ( window . innerWidth < 700 ) 234{ 235tocColumn . style . height = "" ; 236return ; 237} 238var top = Math . max ( 0 , rightColumn . getBoundingClientRect () . top ) ; 239tocColumn . style . top = top + "px" ; 240tocColumn . style . height = ( window . innerHeight - top ) + "px" ; 241} 242function updatePosition () 243{ 244if ( window . innerWidth > 700 ) 245tocColumn . style . display = "" ; 246tocColumn . style . left = rightColumn . getBoundingClientRect () . left + "px" ; 247updateScroll () ; 248} 249window . addEventListener ( "resize" , updatePosition ) ; 250updatePosition () ; 251 252var tocItemsArray = [] ; 253var subSectionItems = [] ; 254var selectedItem = null ; 255function toggleTOC () { 256var tocColumn = document . getElementById ( "tocColumn" ) ; 257if ( tocColumn . style . display == "block" ) 258tocColumn . style . display = "none" ; 259else 260tocColumn . style . display = "block" ; 261event . stopPropagation () ; 262} 263function expandItem ( e ) { 264if ( e == selectedItem ) 265e . style [ "font-weight" ] = "bold" ; 266var childList = e . getElementsByClassName ( "toc_list" ) ; 267if ( childList . length == 0 ) 268return ; 269childList [ 0 ] . style . display = "block" ; 270childList [ 0 ] . style [ "font-weight" ] = "normal" ; 271e . setAttribute ( "class" , "toc_item toc_item_expanded" ) ; 272} 273function collapseItem ( e ) { 274var childList = e . getElementsByClassName ( "toc_list" ) ; 275if ( childList . length == 0 ) 276return ; 277childList [ 0 ] . style . display = "none" ; 278e . setAttribute ( "class" , "toc_item toc_item_collapsed" ) ; 279} 280function tocSpanOnClick ( e ) 281{ 282if ( event . srcElement != null && event . srcElement . parentElement != null ) 283{ 284var link = event . srcElement . parentElement . getAttribute ( "data-link" ) ; 285if ( link != null ) 286{ 287var poundIndex = link . indexOf ( "#" ) ; 288if ( poundIndex == - 1 ) 289window . location . href = link + ".html" ; 290else 291window . location . href = link . substr ( 0 , poundIndex ) + ".html#" + link . substr ( poundIndex + 1 , link . length - poundIndex - 1 ) ; 292} 293} 294event . stopPropagation () ; 295} 296function tocItemOnClick ( e ) 297{ 298if ( event . srcElement == null ) return ; 299// Toggle expanded/collapsed state. 300if ( event . srcElement . getAttribute ( "class" ) . endsWith ( "toc_item_collapsed" )) 301expandItem ( event . srcElement ) ; 302else if ( event . srcElement . getAttribute ( "class" ) . endsWith ( "toc_item_expanded" )) 303collapseItem ( event . srcElement ) ; 304event . stopPropagation () ; 305} 306var path = window . location . pathname ; 307var pageName = path . split ( "/" ) . pop () ; 308var currentPageID = pageName . substr ( 0 , pageName . lastIndexOf ( "." )) ; 309if ( currentPageID . length == 0 ) 310currentPageID = "index" ; 311var tocLists = document . getElementsByClassName ( "toc_root_list" ) ; 312for ( var i = 0 ; i < tocLists . length ; i ++ ) { 313var tocList = tocLists [ i ] ; 314var items = tocList . getElementsByTagName ( "li" ) 315for ( var j = 0 ; j < items . length ; j ++ ) 316tocItemsArray . push ( items [ j ]) ; 317} 318for ( var i = 0 ; i < tocItemsArray . length ; i ++ ) { 319var item = tocItemsArray [ i ] ; 320if ( item . getAttribute ( "data-link" ) == currentPageID ) 321selectedItem = item ; 322if ( item . getElementsByTagName ( "li" ) . length != 0 ) { 323collapseItem ( item ) ; 324} 325else { 326item . setAttribute ( "class" , "toc_item toc_item_leaf" ) ; 327} 328item . addEventListener ( "click" , tocItemOnClick ) ; 329var innerSpan = item . getElementsByTagName ( "span" ) ; 330if ( innerSpan . length != 0 ) 331{ 332innerSpan [ 0 ] . addEventListener ( "click" , tocSpanOnClick ) ; 333innerSpan [ 0 ] . setAttribute ( "class" , "toc_span" ) ; 334} 335} 336var curItem = selectedItem ; 337while ( curItem != null ) { 338expandItem ( curItem ) ; 339curItem = curItem . parentElement ; 340if ( curItem != null && curItem . getAttribute ( "class" ) != null && 341curItem . getAttribute ( "class" ) . startsWith ( "toc_list" )) 342curItem = curItem . parentElement ; 343if ( curItem != null && curItem . getAttribute ( "class" ) != null && 344curItem . getAttribute ( "class" ) . startsWith ( "toc_root_list" )) 345break ; 346} 347 348var subItems = selectedItem . getElementsByTagName ( "li" ) ; 349var subSectionTitles = [] ; 350var subSectionTitleStrs = [] ; 351for ( var i = 0 ; i < subItems . length ; i ++ ) 352{ 353subSectionItems . push ( subItems [ i ]) ; 354var title = subItems [ i ] . getAttribute ( "data-link" ) ; 355var pos = title . lastIndexOf ( "#" ) ; 356title = title . substr ( pos + 1 ) ; 357var element = document . getElementById ( title ) ; 358subSectionTitles . push ( element ) ; 359subSectionTitleStrs . push ( title ) ; 360} 361subSectionTitles . push ( document . getElementById ( "_content_end_" )) ; 362function isSectionFullyVisible ( id ) 363{ 364var titleElement = subSectionTitles [ id ] ; 365var nextTitleElement = subSectionTitles [ id + 1 ] ; 366return ( titleElement . getBoundingClientRect () . top >= 0 && nextTitleElement . getBoundingClientRect () . top <= window . innerHeight ) ; 367} 368function findCurrentSubsection () 369{ 370var currentSubsectionID = - 1 ; 371for ( var i = 0 ; i < subSectionItems . length ; i ++ ) { 372var titleElement = subSectionTitles [ i ] ; 373if ( titleElement == null ) 374continue ; 375if ( titleElement . getBoundingClientRect () . top < window . innerHeight * 0.12 ) 376currentSubsectionID = i ; 377} 378return currentSubsectionID ; 379} 380function updateCurrentSubsection ( currentSubsectionID ) 381{ 382for ( var i = 0 ; i < subSectionItems . length ; i ++ ) 383{ 384if ( i == currentSubsectionID || isSectionFullyVisible ( i )) 385subSectionItems [ i ] . getElementsByTagName ( "span" )[ 0 ] . style [ "font-weight" ] = 600 ; 386else 387subSectionItems [ i ] . getElementsByTagName ( "span" )[ 0 ] . style [ "font-weight" ] = 400 ; 388} 389} 390function windowScroll ( e ) 391{ 392updateCurrentSubsection ( findCurrentSubsection ()) ; 393updateScroll () ; 394} 395window . addEventListener ( "scroll" , windowScroll ) ; 396updateCurrentSubsection ( findCurrentSubsection ()) ; 397</ script > 398< script type = "text/x-mathjax-config" > 399 MathJax.Hub.Config({ 400 tex2jax: { 401 inlineMath: [ ['$$','$$'], ["\\(","\\)"] ], 402 displayMath: [ ['$$','$$'], ["\\(","\\)"] ], 403 }, 404 TeX: { 405 Macros: { 406 bra: ["\\langle{#1}|", 1], 407 ket: ["|{#1}\\rangle", 1], 408 braket: ["\\langle{#1}\\rangle", 1], 409 bk: ["\\langle{#1}|{#2}|{#3}\\rangle", 3] 410 } 411 } 412 }); 413</ script > 414< script id = "MathJax-script" async src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" ></ script > 415</ body > 416 417</ html >