当贴片大小> 4时,曲面细分如何知道面中哪些顶点属于一起?(How does tessellation know what vertices belong together in a face, when patch size > 4?)
不使用曲面细分着色器时,可以传递基本类型(
GL_TRIANGLES
,GL_TRIANGLE_STRIP
等),让OpenGL知道顶点流如何表示几何面。使用曲面细分着色器,
GL_PATCHES
将替换这些基本类型枚举。 在处理大小为3或4的补丁,并将TES中的相应布局设置为三角形或四边形时,这在我的脑海中是有意义的。但是如果我有一个16号的补丁(一些教程这样做),TPG如何知道3或4个顶点形成什么面? 我已经多次读过,当使用
GL_PATCHES
时,顶点缓冲区中的顺序无关紧要,但肯定必须有一个点,其中一组特定的3个顶点被认为是一个三角形(传递给几何着色器)。 这是怎么决定的?When not using tessellation shaders, you can pass a primitive type (
GL_TRIANGLES
,GL_TRIANGLE_STRIP
, etc.) to let OpenGL know how the vertex stream is representing geometry faces.Using tessellation shaders,
GL_PATCHES
replaces these primitive type enums. This makes sense in my head when processing patches of size 3 or 4, and setting the corresponding layout in the TES to triangles or quads.But if I have a patch of size 16 (some tutorials do this), how does the TPG know what 3 or 4 vertices form what faces? I've read several times that the order in your vertex buffer does not matter when
GL_PATCHES
is used, but surely there must be a point where a specific set of 3 vertices is considered a triangle (to pass to e.g. the geometry shader). How is this decided?
原文:https://stackoverflow.com/questions/48302363
最满意答案
您可以尝试使用
HTML::link
。 例:{{ HTML::link('/user/<?=$user_name?>', 'User Profile')}}
This is how I solved it. I'll leave the answer here for other people.
<li><a href="{{ URL::route('profile-user', Auth::user()->username) }}">User Profile</a></li>
相关问答
更多-
这些独立的部件由负责的部件驱动程序连接在一起。 这些驱动程序负责渲染该部分随附的形状。 例如,SaveButton在Orchard.Core / Contents / Drivers / ContentsDriver中的ContentsDriver中呈现: protected override DriverResult Editor(ContentPart part, dynamic shapeHelper) { var results = new List
{ Cont ... -
您可以尝试使用HTML::link 。 例: {{ HTML::link('/user/=$user_name?>', 'User Profile')}} This is how I solved it. I'll leave the answer here for other people.
- User Profile
-
当使用URL查询字符串加载页面时,jQuery设置UI滑块(jQuery set UI Slider when page loads using URL query string)[2022-09-17]
这是我会建议的: $(function() { var climateSteps = [ "Hot", "Humid", "Dry", "Wet" ]; function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.spli ... -
/ ViewBags只在同一个视图中工作 。 这意味着: 如果你在 public ActionResult Index() { ViewBag.Index } 然后由ajax执行 public ActionResult OtherAction() { ViewBag.Other } ViewBag.Other在Index中不可见 public ActionResult Index() { ViewBag.Index ViewBag.Other//erro other is ...
-
这可以通过从ServletContext获取Keycloak AdapterDeploymentContext来实现: AdapterDeploymentContext deploymentContext = (AdapterDeploymentContext) getServletContext().getAttribute(AdapterDeploymentContext.class.getName()); KeycloakDeployment deployment = deploymentContex ...
-
我可能不能正确理解这个问题,但是如果你想在jsp使用基本URL来获取某些链接,那么你的方法就是错误的。 通常你会做这样的事情: 测试 对于控制器中的重定向,您可以指定如果使用RedirectView而不是返回字符串“redirect:xxx”,则必须如何解释url:重定向视图构造函数RedirectView(String url, boolean contextRelative)可用于指定上下文相关到当前的ServletContext或相对于Web服务器。 May I do not correct unde ...
-
一种简单的方法是将index.jsp放在该文件夹中,然后将其重定向到login.xhtml 。 另一种方法是将login.xhtml添加为欢迎页面。 Tomcat文档为两种可能性提供了一个示例: http : //wiki.apache.org/tomcat/HowTo#How_do_I_override_the_default_home_page_loaded_by_Tomcat.3F As @jpr said, i used a Filter to redirect to the login page, ...
-
如果您在全局窗口上使用hashchange,它将起作用,请参见下面的示例 $(window).on('hashchange', function () { if (window.location.hash == "#home") { $('.axiosnext-arrow').hide(); } else { $('.axiosnext-arrow').show(); } }); If you use hashchange on the window g ...
-
基于异常和提供的堆栈跟踪,我认为您的问题是这里描述的。 注意: 从Dictionary代码抛出异常,而不是从您的(用户)代码抛出 NullReferenceException是异常,而不是ArgumentNullException,因此它不仅仅是参数为null 字典不是线程安全的。 这意味着如果多个线程访问它,则应该同步对它的访问。 更新1 似乎SQLite异步处理中存在一个错误 。 Based on the exception and provided stack trace, I think that ...